zarinpal 1.0.5+1 copy "zarinpal: ^1.0.5+1" to clipboard
zarinpal: ^1.0.5+1 copied to clipboard

Zarinpal Package for dar & flutter support all platforms (Android,Ios,Linux,Windows,MacOs,Web)

Zarinpal Package for dar & flutter, support android and ios

آموزش استفاده از پکیج به زبان شیرین پارسی

Zarinpal WebSite

Usage #

A simple usage example:

import 'package:zarinpal/zarinpal.dart';

main() {
  
// Initialize payment request 
 PaymentRequest _paymentRequest = PaymentRequest()
  ..setIsSandBox(true) // if your application is in developer mode, then set the sandBox as True otherwise set sandBox as false
    ..setMerchantID("Zarinpal MerchantID")
    ..setCallbackURL("Verfication Url callbacl"); //The callback can be an android scheme or a website URL, you and can pass any data with The callback for both scheme and  URL
 

String _paymentUrl = null;

_paymentRequest.setAmount("integar Amount");
_paymentRequest.setDescription("Payment Description");
// Call Start payment
ZarinPal().startPayment(_paymentRequest, (int status, String paymentGatewayUri){
     if(status == 100)
         _paymentUrl  = paymentGatewayUri;  // launch URL in browser
});


ZarinPal().verificationPayment("Status", "Authority Call back", _paymentRequest, (isPaymentSuccess,refID, paymentRequest){
     if(isPaymentSuccess){
       // Payment Is Success
     }else{
       // Error Print Status
     }
   });



}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

39
likes
120
pub points
81%
popularity

Publisher

verified publisherflutterfarsi.ir

Zarinpal Package for dar & flutter support all platforms (Android,Ios,Linux,Windows,MacOs,Web)

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

BSD-3-Clause (LICENSE)

Dependencies

dio, flutter, sprintf

More

Packages that depend on zarinpal