popekabu / pay_with_paystack

MIT License
9 stars 21 forks source link

Nothing happens when tapping cancel payment button and transactionNotCompleted, transactionCompleted not executing. #1

Closed wrteam-priyansh closed 1 year ago

wrteam-priyansh commented 1 year ago

This is demo code

PayWithPayStack() .now( context: context, secretKey: paystackSecretKey, //This should be store in server customerEmail: "popekabu@gmail.com", reference: DateTime.now().microsecondsSinceEpoch.toString(), currency: "NGN", paymentChannel: [ "card" ], amount: (amount * 100).toString(), transactionCompleted: () { print("Transaction Successful"); }, metaData: {}, transactionNotCompleted: () { print("Transaction Not Successful!"); }) .then((value) { print(value.toString()); });

popekabu commented 1 year ago

Hello. Have you provided your paystack secret key? On Mon, Oct 17, 2022 at 7:08 AM wrteam-priyansh @.***> wrote:

This is demo code

PayWithPayStack() .now( context: context, secretKey: paystackSecretKey, //This should be store in server customerEmail: @.**", reference: DateTime.now().microsecondsSinceEpoch.toString(), currency: "NGN", paymentChannel: [ "card" ], amount: (amount 100).toString(), transactionCompleted: () { print("Transaction Successful"); }, metaData: {}, transactionNotCompleted: () { print("Transaction Not Successful!"); }) .then((value) { print(value.toString()); });

— Reply to this email directly, view it on GitHub https://github.com/popekabu/pay_with_paystack/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMACNPUWN2YG5YZP3LARILWDT3NPANCNFSM6AAAAAARGYG3MQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

popekabu commented 1 year ago

I got your emails on transactions. Change the customer email to yours and you’ll see your email on your transaction. Also regarding cancelling transactions, you can do that by tapping the close button at the left side of the app bar.

If you have any questions let me know.

Thanks

On Mon, Oct 17, 2022 at 7:30 AM Daniel Kabu Asare @.***> wrote:

Hello. Have you provided your paystack secret key?

On Mon, Oct 17, 2022 at 7:08 AM wrteam-priyansh @.***> wrote:

This is demo code

PayWithPayStack() .now( context: context, secretKey: paystackSecretKey, //This should be store in server customerEmail: @.**", reference: DateTime.now().microsecondsSinceEpoch.toString(), currency: "NGN", paymentChannel: [ "card" ], amount: (amount 100).toString(), transactionCompleted: () { print("Transaction Successful"); }, metaData: {}, transactionNotCompleted: () { print("Transaction Not Successful!"); }) .then((value) { print(value.toString()); });

— Reply to this email directly, view it on GitHub https://github.com/popekabu/pay_with_paystack/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMACNPUWN2YG5YZP3LARILWDT3NPANCNFSM6AAAAAARGYG3MQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

wrteam-priyansh commented 1 year ago

@popekabu I have added paystack secret key.

popekabu commented 1 year ago

Ok @wrteam-priyansh, have i answered your question in my previous response? If I have kindly mark as closed/completed.

Thank you!

wrteam-priyansh commented 1 year ago

@popekabu , one thing to ask when will these two transactionCompleted, transactionNotCompleted will execute. I know that by tapping on close button i can cancel the process/payment then what is the use of having cancel button in ui.

popekabu commented 1 year ago

Sorry for the late response. The cancel button checks first to see if a transaction was completed or not.

If it was completed, your transaction function will execute. If it wasn't completed, your transactionNotCompleted function will execute. So whatever you put in your function will run!

juniorwasiu commented 1 year ago

hey there just found this am having thesame issue function not executeted after transaction complete.

what do i do?