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.
- Create Order API Change
We have deprecated the use of order_token and instead introducedpayment_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"
-
New Android SDK
Please use the new improvised Android SDK which will take inpayment_session_id
Android SDK. -
CFSession
In the new SDK, CFSession objects will takepayment_session_id
as input instead of theorderToken
.
CFSession cfSession = new CFSession.CFSessionBuilder()
.setEnvironment(CFSession.Environment.SANDBOX)
.setPaymentSessionID("paymentSessionID")
.setOrderId("orderID")
.build();
- New SDKs
Going forward, all SDKs will usepayment_session_id
instead oforder_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);
- 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.
- 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.
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].
Updated 12 months ago