ahmedelkhyary / hyperpay

MIT License
6 stars 18 forks source link

Adding async payment? #4

Closed hewa-jalal closed 1 year ago

hewa-jalal commented 1 year ago

Thank you for creating this package, but do you have plans on adding asynchronous payment as well?

ahmedelkhyary commented 1 year ago

I hope you are doing well it's already redirection takes place to allow the account holder to complete/verify (Like OTP) the payment, after this the account holder is redirected back to the app

hewa-jalal commented 1 year ago

i am sorry but can you clarify furthermore?

ahmedelkhyary commented 1 year ago

Asynchronous Payments In an asynchronous workflow a redirection takes place to allow the account holder to complete/verify the payment. After this the account holder is redirected back to the app and the status of the payment can be queried.

Android Register a custom URL scheme

Define the name of your custom scheme (for example companyname) and add intent filter to your target activity in the AndroidManifest.xml

iOS Register a custom URL scheme In Xcode, click on your project in the Project Navigator and navigate to App Target > Info > URL Types Click [+] to add a new URL type Under URL Schemes, enter your app switch return URL scheme. This scheme must start with your app's Bundle ID. For example, if the app bundle ID is com.companyname.appname, then your URL scheme could be com.companyname.appname.payments.

_please check reference , _Because we are already implementation this part__

https://wordpresshyperpay.docs.oppwa.com/tutorials/mobile-sdk/custom-ui/asynchronous-payments

hewa-jalal commented 1 year ago

but how do i get the intent.scheme in flutter? and onActivityResult, onNewIntent , onResume?

ahmedelkhyary commented 1 year ago

sorry , could you please explain what you mean? if you mean about intent scheme is a name that identifies either a unique object or a unique class of objects, where the "object" or class may be an idea, physical countable

hewa-jalal commented 1 year ago

image image i mean how can i do these steps required for async with your plugin?

ahmedelkhyary commented 1 year ago

It already exists inside the plugin

hewa-jalal commented 1 year ago

and how do i use it?

ahmedelkhyary commented 1 year ago

No need to do these steps again ? plugins do these steps automatically

hewa-jalal commented 1 year ago

that's awesome, but this is what i got when i used the plugin from my gate2play provider! so i thought the plaugin is only doing synchronous payment image

ahmedelkhyary commented 1 year ago

please check 3Ds reference https://wordpresshyperpay.docs.oppwa.com/tutorials/mobile-sdk/emv-3ds#ready-to-use-ui

image

setup 3Ds in plugin, image

ahmedelkhyary commented 1 year ago

Which platform was used, Android or IOS?

hewa-jalal commented 1 year ago

so all i need to do for 3D to work is change the mode to live instead of test? and it's android

ahmedelkhyary commented 1 year ago

Is it possible to work with you on anydesk to determine what to do?

hewa-jalal commented 1 year ago

yes sure i will be thankful, here is my discord if you want to communicate there hiwa-47#9877