This guide provides step-by-step instructions for integrating Adyen iOS Drop-in with spree_adyen using session flow and Drop-In component.
spree_adyen
spree extensionreturn_url
.
Return url tells where shopper should be redirect after the payment from outside your application (for example klarna or most of others buy now pay later systems).
Use the custom URL for your app, like my-app://adyen
. Url can contain custom query params however do not include any personally identifiable information (PII) of your customer. Maximum length of the url is 1024 characters.
environment
- Environment.test or Environment.live
clientKey
- client_key
from payment_sessions endpoint
data
- available as adyen_data
in payment_session API responsesessionId
- available as adyen_id
in payment_session API responseaction
field is redirect
you need to handle the redirect result.
action
field returns redirect
the shopper is completing the payment outside of your application. You need to inform the Drop-in when the shopper returns to your app.
Here an example for a Custom Url scheme:
UIApplicationDelegate
:authorised
- payment authorisedrefused
- payment refusedpending
- payment pending (for payments with asynchronous flow like iDEAL). When the shopper completes the payment webhook will process process the payment.cancelled
- payment canceledreceived
- some payments needs more time to be processed. When the status is available webhook will process the paymenterror
- an error occurred when processing the payment. The response contains more details with the error code
Your instance of AdyenSession calls the didFail method containing the error.
payment_session
to one of the following state:
pending
- chosen payment method can take a while to completecompleted
- payment resulted in success, order completedcanceled
- payment canceled, payment is void
refused
- payment failed