payengine

Last updated:

0 purchases

payengine Image
payengine Images
Add to Cart

Description:

payengine

PayEngine SDK for Flutter #
The PayEngine Flutter SDK allows you to build delightful payment experiences in your native Android and iOS apps using Flutter. We provide powerful and customizable UI screens and elements that can be used out-of-the-box to collect your users' payment details
Getting Started #
PayEngine config
final PayEngineConfig config = const PayEngineConfig(
publicKey: "pk_test_xxx",
scriptURL: "https://console.payengine.dev");
final String merchantId = "<your-merchant-id>";
copied to clipboard
Credit Card Form
var additionalFields = List<PayEngineField>.from([
PayEngineField('address_zip', 'text', 'Zip Code', true,
keyboardType: PayEngineKeyboardType.number,
pattern:
r"^(?:\d{5}(?:-\d{4})?|[ABCEGHJKLMNPRSTVXY]\d[A-Z] ?\d[A-Z]\d)$"),
]);

final creditCardForm = CreditCardForm(config: payengineConfig, additionalFields: additionalFields);

Container(padding: const EdgeInsets.all(10), child: creditCardForm),

OutlinedButton(
onPressed: () async {
final response = await creditCardForm.tokenize(merchantId);
setState(() {
result = response;
});
},
child: const Text('Tokenize')),
copied to clipboard
Bank Account Form
final bankAccountForm = BankAccountForm(config: payengineConfig);

Container(padding: const EdgeInsets.all(10), child: bankAccountForm),
OutlinedButton(
onPressed: () async {
final response = await bankAccountForm.tokenize(merchantId);
setState(() {
result = response;
});
},
child: const Text('Tokenize')),
copied to clipboard
Other components

Widget build(BuildContext context) {
return PayEngine(
type: "boarding",
config: payengineConfig,
params: {
"merchant-id": merchantId
},
onEvent: (Map<String, dynamic> event) {
debugPrint("$event");
});
}
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.