paymob_pakistan 1.0.2 copy "paymob_pakistan: ^1.0.2" to clipboard
paymob_pakistan: ^1.0.2 copied to clipboard

Easily accept Jazzcash/Easypaisa/Card Payments through Paymob in your Flutter app.

paymob_pakistan #

Easily accept Jazzcash/Easypaisa/Card Payments through Paymob in your Flutter app.

๐Ÿš€ Installation #

Add this to dependencies in your app's pubspec.yaml

paymob_pakistan : latest_version

๐Ÿ”จ Initialization #

PaymobPakistan.instance.initialize(
  apiKey: "", // from dashboard Select Settings -> Account Info -> API Key 
  jazzcashIntegrationId: 123123, // From Dashboard select Developers -> Payment Integrations -> JazzCash Integration ID
  easypaisaIntegrationID: 123123,  // From Dashboard select Developers -> Payment Integrations -> EasyPaisa Integration ID
  integrationID: 123456, // from dashboard Select Developers -> Payment Integrations -> Online Card ID 
  iFrameID: 123456, // from paymob Select Developers -> iframes 
);

๐Ÿ“Œ Note :

You can use this singleton (instance) or Create your own
if you want to create different iFrames or integrations

final PaymobPakistan paymobPakistan = PaymobPakistan();
  paymobPakistan.initialize(
  apiKey: "", 
  jazzcashIntegrationId: 123123, 
  easypaisaIntegrationID: 123123,  
  integrationID: 123456, 
  iFrameID: 123456, 
);

๐Ÿ”– Usage #

final PaymobResponse? response = await PaymobPakistan.instance.pay(
  context: context,
  currency: "EGP",
  paymentType: PaymentType.card, // or you can User paymentType: PaymentType.jazzcash OR PaymentType.easypaisa
  amountInCents: "50000", // 500 PKR
  onPayment: (response) => setState(() => this.response = response), // Optional
)

๐Ÿ“จ PaymobResponse #

Variable Type Description
success bool Indicates if the transaction was successful or not
transactionID String? The ID of the transaction
responseCode String? The response code for the transaction
message String? A brief message describing the transaction

๐Ÿงช Testing Cards #

โœ… Successful payment

Variable Description
Card Number 5123456789012346
Expiry Month 12
Expiry Year 25
CVV 123
Name Test Account

โŽ Declined payment

Change cvv to 111 or expiry year to 20

๐Ÿ“Œ Note :

May be you have to contact paymob support to activate your test card

29
likes
0
pub points
71%
popularity

Publisher

verified publishercodeminer.co

Easily accept Jazzcash/Easypaisa/Card Payments through Paymob in your Flutter app.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter, webview_flutter

More

Packages that depend on paymob_pakistan