payengine 2.0.0-alpha-2 copy "payengine: ^2.0.0-alpha-2" to clipboard
payengine: ^2.0.0-alpha-2 copied to clipboard

The PayEngine Flutter SDK allows you to build delightful payment experiences in your native Android and iOS apps using Flutter

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>";

Wrap the config in a Provider

PayEngineProvider(
  config: Config.config, 
  child: const MyApp()
)

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(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')),

Bank Account Form

final bankAccountForm = BankAccountForm();

Container(padding: const EdgeInsets.all(10), child: bankAccountForm),
OutlinedButton(
    onPressed: () async {
      final response = await bankAccountForm.tokenize(merchantId);
      setState(() {
        result = response;
      });
    },
    child: const Text('Tokenize')),
2
likes
0
points
75
downloads

Publisher

unverified uploader

Weekly Downloads

The PayEngine Flutter SDK allows you to build delightful payment experiences in your native Android and iOS apps using Flutter

Homepage

License

unknown (license)

Dependencies

flutter, flutter_web_plugins, http, path_provider, plugin_platform_interface, provider, webview_flutter, webview_flutter_android, webview_flutter_wkwebview

More

Packages that depend on payengine