Migrating from 1.0.x to 2.x

We have released our latest version 2.0.+ to make our integration more secure for merchants and customers to use. In the this latest version, we have revamped the integration method for using our pre-built checkout and made some changes in our SDKs.

Following are the key changes made in the latest version. Please check respective pages for detailed changes.

  1. Create Order API Change
    We have deprecated the use of order_token and instead introduced payment_session_id in response of Create Order API.

Please change the the header value x-api-version for order creation API in your existing code to receive payment_session_id instead of order_token in the response.

x-api-version: "2022-09-01"
  1. New Android SDK
    Please use the new improvised Android SDK which will take in payment_session_id Android SDK.

  2. CFSession
    In the new SDK, CFSession objects will take payment_session_id as input instead of the orderToken.

CFSession cfSession = new CFSession.CFSessionBuilder()
        .setEnvironment(CFSession.Environment.SANDBOX)
        .setPaymentSessionID("paymentSessionID")
        .setOrderId("orderID")
        .build();
  1. New SDKs
    Going forward, all SDKs will use payment_session_id instead of order_token to complete the payment.
CFSession cfSession = new CFSession.CFSessionBuilder()
        .setEnvironment(CFSession.Environment.SANDBOX)
        .setPaymentSessionID("paymentSessionID")
        .setOrderId("orderID")
        .build();
        
CFTheme cfTheme = new CFTheme.CFThemeBuilder()
                .setNavigationBarBackgroundColor(binding.tieNbc.getText().toString().trim())
                .setNavigationBarTextColor(binding.tieNtc.getText().toString().trim())
                .setButtonBackgroundColor(binding.tieBbc.getText().toString().trim())
                .setButtonTextColor(binding.tieBtc.getText().toString().trim())
                .setPrimaryTextColor(binding.tiePtc.getText().toString().trim())
                .setSecondaryTextColor(binding.tieStc.getText().toString().trim())
                .setSecondaryTextColor(binding.tieStc.getText().toString().trim())
                .build();
   
CFDropCheckoutPayment cfDropCheckoutPayment = new CFDropCheckoutPayment.CFDropCheckoutPaymentBuilder()
                                .setSession(cfSession)
                                .setCFNativeCheckoutUITheme(cfTheme)
                                .build();
                                
CFPaymentGatewayService.getInstance().doPayment(this, cfDropCheckoutPayment);
  1. Whitelisting the application package names.

The newer versions of our SDK comes with a lot of security enhancements and one of them is application package check. You can check step-by-step process of making whitelisting request here.

  1. Application Integrity

The latest versions of our Android SDK(1.1.0 and newer) comes with Play Integrity API integration which prevents applications from using our payment features if the application is distributed outside of playstore. This enables us to protect our merchants from potentially risky and fraudulent interactions, such as cheating and unauthorized access, allowing us to respond with appropriate actions to prevent attacks and reduce abuse.

Apps on Google Play

In the Play Console, navigate to the Release section of the left menu. Go to Setup > App integrity. Select the Integrity API tab and enable it.

1074

Apps distributed outside Google Play Store

If your application is distributed outside of the play store get in touch with your account manager or write an email to [email protected].