square_pos

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

square pos

Square POS SDK for Flutter #

A Flutter wrapper to use the Square POS SDK.
With this plugin, your app can easily request payment via the Square POS app on Android and iOS.
Prerequisites #

Registered for a Square developer account via Square.
Deployment Target iOS 12.0 or higher.
Android minSdkVersion 21 or higher.

Add URL schemes (iOS) #

Add the request URL scheme as a LSApplicationQueriesSchemes key into your Info.plist file to indicate that your application uses the square-commerce-v1 URL scheme to open Square Point of Sale.

<key>LSApplicationQueriesSchemes</key>
<array>
<string>square-commerce-v1</string>
</array>
copied to clipboard

Add your custom response URL scheme as CFBundleURLTypes keys in your Info.plist file.

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>YOUR_BUNDLE_URL_NAME</string>
<key>CFBundleURLSchemes</key>
<array>
<string>myapp-url-scheme</string>
</array>
</dict>
</array>
copied to clipboard
Installing #
Add square_pos to your pubspec.yaml:
dependencies:
square_pos:
copied to clipboard
Import square_pos:
import 'package:square_pos/square_pos.dart';
copied to clipboard
Getting Started #
Init SquarePos SDK:
SquarePos.init(applicationID, callbackScheme);
copied to clipboard
Check if Square POS is installed on device:
SquarePos.canRequest;
copied to clipboard
Complete a transaction:
var request = SquarePosPaymentRequest(
money: SquarePosMoney(amountCents: 100, currencyCode: "USD"),
supportedTenderTypes: [
SquarePosTenderType.card,
SquarePosTenderType.cardOnFile,
SquarePosTenderType.squareGiftCard
]);
SquarePos.requestPayment(request);
copied to clipboard
Available APIs #
SquarePos.init(applicationID, callbackScheme);

SquarePos.canRequest;

SquarePos.requestPayment(request);
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.