tap_google_pay_kit_flutter

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

tap google pay kit flutter

TapGooglePayKit-Flutter #
A standalone Flutter kit for handling Google Pay™ (Only for Android)
Getting Started #
Table of Contents #


Requirements
Installation

Installation with pubspec.yaml


Additional Android Configuration
Usage

Configure Your App
SDK Enums
SDK Modes
Allowed Methods
Allowed Card Networks
Google Pay Button Type
Google Pay Button
SDK Methods




Requirements #

To use the SDK the following requirements must be met:

Visual Studio - InteliJ Idea
Dart 2.7.1 or newer
Flutter: >=2.5.0 or newer


Installation #


Include TapGooglePayKit plugin as a dependency in your pubspec.yaml #
dependencies:
tap_google_pay_kit_flutter: ^0.0.4
copied to clipboard

Additional Android Configuration #
To use GooglePay in your app , you will be required to do additional configuration as follows:

In build.gradle file add

implementation "com.google.android.gms:play-services-wallet:18.1.3"
copied to clipboard

Ensure your min sdk is 21

minSdk 21
targetSdk 32
copied to clipboard

In Manifest file , Inside the <application tag do the below:

<meta-data
android:name="com.google.android.gsm.wallet.api.enabled"
android:value="true"
/>
copied to clipboard


Configure your app #
TapGooglePayKit should be set up. To set it up, add the following lines of code somewhere in your project and make sure they will be called before any usage of TapGooglePayKit.
/**
* Configure SDK.
*/
TapGooglePayKitFlutter.configureSDK(
secretKey: "sk_test_xxxxxxxxxxxxxxxxxx",
bundleId: "com.xxx.xxxxxxx",
countryCode: "US",
transactionCurrency: "USD",
sdkMode: SDKMode.Sandbox,
allowedMethods: AllowedMethods.ALL,
allowedCardNetworks: [AllowedCardNetworks.VISA.name],
gatewayID: "xxxxx",
gatewayMerchantID: "122xxxxx",
amount: "23",
sdkCallbackMode: SDKCallbackMode.GetGooglePayToken,
);
copied to clipboard


SDK Enums #

SDK Modes
sdkMode: SDKMode.Sandbox
copied to clipboard
You can set the sdk mode into one of the following modes:

Sandbox

dart SDKMode.Sandbox


Testing mode


Production

dart SDKMode.Production


Production mode




AllowedMethods
allowedMethods: AllowedMethods.ALL
copied to clipboard
You can set the allowed methods into one of the following modes:

PAN_ONLY

dart AllowedMethods.PAN_ONLY


CRYPTOGRAM

dart AllowedMethods.CRYPTOGRAM


ALL

dart AllowedMethods.ALL




AllowedCardNetworks
allowedCardNetworks: [AllowedCardNetworks.VISA.name]
copied to clipboard
You can set the allowed card networks mode into one of the following modes:

AMEX

dart AllowedCardNetworks.AMEX.name


MASTERCARD

dart AllowedCardNetworks.MASTERCARD.name


VISA

dart AllowedCardNetworks.VISA.name




GooglePayButtonType
googlePayButtonType: GooglePayButtonType.NORMAL_GOOGLE_PAY
copied to clipboard
You can set the google pay button type into one of the following types:

BUY_WITH_GOOGLE_PAY

dart GooglePayButtonType.BUY_WITH_GOOGLE_PAY


DONATE_WITH_GOOGLE_PAY

dart GooglePayButtonType.DONATE_WITH_GOOGLE_PAY


NORMAL_GOOGLE_PAY

dart GooglePayButtonType.NORMAL_GOOGLE_PAY


PAY_WITH_GOOGLE_PAY

dart GooglePayButtonType.PAY_WITH_GOOGLE_PAY


SUBSCRIBE_WITH_GOOGLE_PAY

dart GooglePayButtonType.SUBSCRIBE_WITH_GOOGLE_PAY


CHECKOUT_WITH_GOOGLE_PAY

dart GooglePayButtonType.CHECKOUT_WITH_GOOGLE_PAY


ORDER_WITH_GOOGLE_PAY

dart GooglePayButtonType.ORDER_WITH_GOOGLE_PAY


BOOK_WITH_GOOGLE_PAY

dart GooglePayButtonType.BOOK_WITH_GOOGLE_PAY





GooglePayButton #
Google Pay Button Widget
TapGooglePayKitFlutter.googlePayButton(
googlePayButtonType: GooglePayButtonType.NORMAL_GOOGLE_PAY,
onTap: () {
// Call available SDK Methods
},
),
copied to clipboard


SDK Methods #
Get Google Pay Token
var tapGooglePaySDKResult = await TapGooglePayKitFlutter.getGooglePayToken;
copied to clipboard
Get Tap Token
var tapTokenSDKResult = await TapGooglePayKitFlutter.getTapToken;
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.