Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

درگاه پرداخت زرین پال در فلاتر #1

Open
hosseinnouri14 opened this issue Feb 8, 2022 · 0 comments
Open

درگاه پرداخت زرین پال در فلاتر #1

hosseinnouri14 opened this issue Feb 8, 2022 · 0 comments

Comments

@hosseinnouri14
Copy link

سلام وقت بخیر
من از پکیج زرین پال که قرار داده بودین استفاده کردم و کاربر رو ارسال هم کردم به صفحه پرداخت فقط در برگشت از نمیدونم چکار باید بکنم از deep link استفاده کردم و برمیگردم به صفحه برنامه ولی هیچ اطلاعاتی از اینکه پرداخت موفق یوده یا نه ندارم ؟
` static String _paymentUrl = '';

PaymentRequest _paymentRequest = PaymentRequest()
..setIsSandBox(false) // if your application is in developer mode, then set the sandBox as True otherwise set sandBox as false
..setMerchantID("71c705f8-bd37-11e6-aa0c-000c295eb8fc")
..setCallbackURL("http://app.mystore");

String link = "";

@OverRide
void initState() {

//http://app.mystore/?Authority=000000000000000000000000000000760377&Status=NOK
//
ZarinPal().verificationPayment("Status", "Authority Call back", _paymentRequest, (isPaymentSuccess,refID, paymentRequest){
  if(isPaymentSuccess){
    // Payment Is Success
    print("Success");
  }else{
    // Error Print Status
    print("Error");
  }

});

initUniLinks().then((value) => this.setState(() {

    link = value!;
    print("link = " + link);



}));

super.initState();

}

Future<String?> initUniLinks() async {
// Platform messages may fail, so we use a try/catch PlatformException.
try {

    final initialLink = await getInitialLink();
    // Parse the link and warn the user, if it is not correct,
    // but keep in mind it could be `null`.
    return initialLink;

//http://app.mystore/?Authority=000000000000000000000000000000760431&Status=NOK

} on PlatformException {
  // Handle exception by warning the user their action did not succeed
  // return?
}

}

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant