Advanced Options

Here you can find some examples of advanced workflow customization for our ready-to-use UI.

Todo Java Script

PAYMENT METHODS

Brand management

There are 2 possible ways to set brands for your checkout:

  • In your app (see Configuring Checkout Settings)
  • In the merchant and administration portal – allowing to update the brands offered to shoppers without requiring an update of the mobile app.

Located under “Administration > COPYandPAY > Categories > Brands”, you optionally can define which brands are displayed in the checkout by configuring the “Allowed Brands” on a channel, or any of its parents/ancestors.

To activate the brand configuration through the merchant and administration portal, first set the “Activate Brand Management” to TRUE.

The last setting “Override shop brands” is used to decide on the policy to propagate new Brands you enter to the checkout:

  • Either override whatever was defined in the shop. (Value TRUE)
  • Or offer only brands for payment, that are both specified in the BIP and in the checkout settings in the app (Value FALSE, default)

 

Display total amount

Total amount will be shown on the payment method selection screen and on the payment forms right in the button like on the screenshots below.

iOS Show Total Amount

Custom logos

Since version 2.48.0 ready-to-use UI allows to set your custom logos for the payment brands.

CREDIT CARD

Skipping CVV

Checkout project provides an opportunity to skip CVV request for all cards or only for stored ones.

Skipping card holder

If you are not going to collect holder name for the card payments, you can just hide this field using appropriate configuration of the OPPCheckoutSettings:

Override card holder validation

Since version 2.29.0 ready-to-use UI allows you to override holder validation for the card payments.

Display installment options

By default the installment option is disabled. Since version 2.30.0 you can enable this option by configuring OPPCheckoutSettings in the following way:
  • Enable installment payments
  • Set your list of options if needed. Default is 1, 3, 5.

Installments

Card brand detection

Card brand is detected automatically while shopper is typing the card number. However there are some configurations you might want to apply regarding your needs.

Firstly you can choose between different ways of brand detection:

  • using base of regular expressions
  • using library of bins, which is more precise.

Then you should choose how to proceed if multiple card brands are detected.

  • Set the order for detected brands
  • Decide whether you want either present multiple brands or hide them by default

Below you can see more detailed description for each configuration with user cases and video snippets.

SECURITY

Protect payments with Touch ID / Face ID

You can provide additional security for your shoppers by enabling biometric authentication for payment confirmation.
To complete payment shopper will have to authenticate with Touch ID of Face ID, if they are set on device, otherwise device passcode will be requested.

It’s recommended to enable this protection for tokens (stored cards and back account information).
Biometrics authentication can be configured for any payment brands as well.

There are three modes of requesting device authentication:

  1. Never OPPSecurityPolicyModeDeviceAuthNotRequired
    Device authentication is disabled
  2. If available OPPSecurityPolicyModeDeviceAuthRequiredIfAvailable
    App requires device authentication only if Touch ID / Face ID or passcode are set.
  3. Always OPPSecurityPolicyModeDeviceAuthRequired
    Device authentication is required to complete payment. Payment brand won’t be available if neither Touch ID / Face ID nor passcode are set.

To configure device authentication create an appropriate OPPSecurityPolicy and add it to the securityPolicies option of the OPPCheckoutSettings.
OPPSecurityPolicy applies specified mode for tokens or list of payment brands.

Touch id

CALLBACKS

Receiving callbacks during checkout process (available since 2.13.0)

Note: Android

PAYMENT METHODS

Brand management

There are 2 possible ways to set brands for your checkout:
  • In your app (see Configuring Checkout Settings)
  • In the merchant and administration portal – allowing to update the brands offered to shoppers without requiring an update of the mobile app.
Located under “Administration > COPYandPAY > Categories > Brands”, you optionally can define which brands are displayed in the checkout by configuring the “Allowed Brands” on a channel, or any of its parents/ancestors. To activate the brand configuration through the merchant and administration portal, first set the “Activate Brand Management” to TRUE. The last setting “Override shop brands” is used to decide on the policy to propagate new Brands you enter to the checkout:
  • Either override whatever was defined in the shop. (Value TRUE)
  • Or offer only brands for payment, that are both specified in the BIP and in the checkout settings in the app (Value FALSE, default)

Display total amount

Total amount will be shown on the payment method selection screen and on the payment forms right in the button like on the screenshots below.

Android Show Total Amount

Custom logos

Since version 2.48.0 ready-to-use UI allows to set your custom logos for the payment brands.

CREDIT CARD

Skipping CVV

Checkout project provides an opportunity to skip CVV request for all cards or only for stored ones.

Skipping card holder

If you are not going to collect holder name for the card payments, you can just hide this field using appropriate configuration of the CheckoutSettings:

Override card holder validation

Since version 2.29.0 ready-to-use UI allows you to override holder validation for the card payments.
Pass created listener to the CheckoutSettings.

Display installment options

To display installment options configure CheckoutSettings in the following way:
  • Enable installment payments
  • Set your list of options if needed. Default is 1, 3, 5.

Installments

Card brand detection

Card brand is detected automatically while shopper is typing the card number. However there are some configurations you might want to apply regarding your needs.

Firstly you can choose between different ways of brand detection:

  • using base of regular expressions
  • using library of bins, which is more precise.

 

Then you should choose how to proceed if multiple card brands are detected.

  • Set the order for detected brands
  • Decide whether you want either present multiple brands or hide them by default

 

Below you can see more detailed description for each configuration with user cases and video snippets.

SECURITY

NOTE: This functionality available only for Android 5.0 (API level 21) and higher.

You can provide additional security for your shoppers by enabling payment confirmation with device authentication. To complete payment shopper will have to provide their credentials (Pattern, PIN, Password or Fingerprint if available). It’s recommended to enable this protection for tokens (stored cards and back account information). Protection with device authentication can be configured for any payment brands as well. There are three modes of requesting device authentication
    1. Never CheckoutSecurityPolicyMode.DEVICE_AUTH_NOT_REQUIRED
Device authentication is disabled.
    1. If available CheckoutSecurityPolicyMode.DEVICE_AUTH_REQUIRED_IF_AVAILABLE
App requires device authentication only if it is set by user.
    1. Always CheckoutSecurityPolicyMode.DEVICE_AUTH_REQUIRED
Device authentication is required to complete payment. Payment brand won’t be available if device is not secured, i.e. Pattern, PIN, Password or Fingerprint is not set. You can configure device authentication per payment brand. For example:

Device authentication

Set device authentication for tokens:

CALLBACKS

Receiving callbacks during checkout process (available since 2.13.0)

Declare your broadcast receiver in AndroidManifest.xml.
<receiver
    android:name=".CheckoutBroadcastReceiver"
    android:exported="false" />
NOTE: It is important to set android:exported=”false” to your broadcast reciever. In this case, the only messages the broadcast receiver can receive are those sent by components of the same application or applications with the same user ID.
To provide the best security our SDK uses directed broadcasts. This way our broadcast is received only by the specified BroadcastReceiver. For this reason you should add ComponentName of your receiver to CheckoutActivity intent.

Summary page

It is possible to use Mobile SDK to temporarily store the payment information after submission, rather than executing it straight away. This can be useful if you want to display an order summary page before committing the payment. For this purpose, you should implement your broadcast receiver to listen the intents from CheckoutActivity and use CheckoutActivity.ACTION_ON_BEFORE_SUBMIT callback to display the summary page.

The summary page should consist of at least two actions:

1. Confirm payment. You should just return control back to the CheckoutActivity to submit the payment.

2. Cancel payment. In this case the CheckoutActivity should be started with CheckoutActivity.EXTRA_TRANSACTION_ABORTED flag. Then checkout will be closed with ErrorCode.ERROR_CODE_TRANSACTION_ABORTED code.