flutter_wayforpay_package 0.0.2 copy "flutter_wayforpay_package: ^0.0.2" to clipboard
flutter_wayforpay_package: ^0.0.2 copied to clipboard

A package to simplify work with the WayForPay payment system. Is a wrapper over WayForPay API.

Flutter Wayforpay Package #

Pub Version

A package to simplify work with the WayForPay payment system. Is a wrapper over WayForPay API.

✨ Features #

  • Card data entry screen
  • 3D Secure verification
  • Ability to create a custom data entry screen
  • Comments :)

📷 Screenshots #

⚙️ Getting Started #

Create WayForPay object

WayForPay wayForPay = WayForPay();

Set your merchantAccount and merchantSecretKey

wayForPay.merchantAccount = "test_merch_n1";
wayForPay.merchantSecretKey = "flk3409refn54t54t*FNJRET";

Set your products list

wayForPay.productCount = [1]; 
wayForPay.productName = ["Test product"];
wayForPay.productPrice = [0.1];

Open card enter screen and be ready to get payment status. Check if wayForPayResponse is not null

wayForPay  
    .openCardEnterScreen(context,  
        orderDate: DateTime.now(),  
        merchantTransactionSecureType: MerchantTransactionSecureType.AUTO,  
        orderReference: "testReference",  
        amount: 0.1)  
  
  .then((value) {  
  if (value != null) {  
  print("transactionStatus: " +  
  value.transactionStatus +  
  ", reasonCode: " +  
  value.reasonCode.toString() +  
  ", reason: " +  
  value.reason);  
  }  
});

Or #

Create card user data model

CardModel cardModel = CardModel(  
  card: "0000000000000000",  
    cardCvv: "111",  
    cardHolder: "Ivanov Ivan",  
    expMonth: "01",  
    expYear: "2030");

And start payment manually

wayForPay  
    .makePayment(context,  
        cardModel: cardModel,  
        amount: 0.1,  
        merchantTransactionSecureType: MerchantTransactionSecureType.AUTO,  
        orderReference: "testReference",  
        orderDate: DateTime.now())  
  .then((value) {  
  if (value != null) {  
  print("reasonCode: " +  
  value.reasonCode.toString() +  
  ", reason: " +  
  value.reason);  
  }  
});

❓ Usage #

Before going on to copy-paste the code snippets in this section, double-check you have configured your application correctly. If you encounter any issues please refer to the API docs and the sample code in the example directory before opening a request on Github.

Example app #

The example directory has a sample application that demonstrates the features of this package.

API reference #

Checkout the lovely API documentation generated by pub.

👨‍💻 Creator #

Dmytro Poroshyn in Squadra

6
likes
30
pub points
19%
popularity

Publisher

unverified uploader

A package to simplify work with the WayForPay payment system. Is a wrapper over WayForPay API.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

crypto, flutter, flutter_webview_plugin, http, mask_text_input_formatter, rxdart

More

Packages that depend on flutter_wayforpay_package