Payment-method icon

MB WAY Component

Add MB WAY to an existing Components integration.

This page explains how to add MB WAY to your existing iOS Components integration.

Requirements

Requirement Description
Integration type Make sure that you have built your iOS Components integration.
Setup steps Before you begin, add MB WAY in your test Customer Area.

MB WAY is supported as of Components version 3.7.0. For more information, refer to Release notes.

API reference

Include fields for the endpoint you integrated:

For a full list of optional fields that you can send for all payment methods, see /sessions.

/sessions request
Expand view
Copy link to code block
Copy code
Copy code
curl https://checkout-test.adyen.com/checkout/v70/sessions \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-d '{
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_ORDER_REFERENCE",
"amount": {
"currency": "",
"value": 1000
},
"returnUrl": "my-app://adyen"
"shopperStatement": "MB WAY shopper statement"
}'

Component configuration

v5.0.0 or later

If your integration uses iOS Components v5.0.0 or later, configure and create an instance of the MB WAY Component:

Component configuration
Expand view
Copy link to code block
Copy code
Copy code
let paymentMethods = session.sessionContext.paymentMethods
// Check that the payment method is supported before showing the Component.
guard let paymentMethod = paymentMethods.paymentMethod(ofType: MBWayPaymentMethod.self) else { return }
let configuration = MBWayComponent.Configuration()
let component = MBWayComponent(paymentMethod: paymentMethod,
context: context,
configuration: configuration)
self.currentComponent = component
// Set the session as the delegate.
component.delegate = session
present(component)

v4.x.x

If your integration uses an earlier version of iOS Components:

Component configuration
Expand view
Copy link to code block
Copy code
Copy code
// Check that the payment method is supported before showing the Component.
guard let paymentMethod = paymentMethods.paymentMethod(ofType: MBWayPaymentMethod.self) else { return }
let style = FormComponentStyle()
let component = MBWayComponent(paymentMethod: paymentMethod,
apiContext: context,
style: style)
present(component)

There are no configuration steps specific to MB WAY required for Components.

Test and go live

To test your MB WAY integration, you can use any telephone number; for example +351234567890.

You can check the status of MB WAY test payments in your Customer Area > Transactions > Payments.

Before you can accept live MB WAY payments, add MB WAY in your live Customer Area.

Trigger a resultCode

To trigger a specific resultCode value, append a code to the shopperStatement value in your /payments request:

resultCode Code to append to shopperStatement
Authorised
(default test response)
-c1
Pending -c3
Refused -c5

For example, to receive resultCode: Refused, include the following in your /payments request: "shopperStatement": "MBWay shopper statement-c5"

See also