Plural Checkout
Introduction
Pine Labs' Plural Checkout for Mobile SDK facilitates enhanced mobile payments experience for end user in mobile app eco-system. It helps to build best in market mobile-based payment systems using this SDK.
Pine Labs' Plural Checkout enhances the payment experience and boosts the success rate with the following array of the features.
- Auto-OTP processing In Pine Labs' Plural Checkout enabled transaction journey, Auto-OTP processing involves following functions.
- It reads the OTP from the customer's registered mobile number.
- It shows the OTP to the customer and asks for the approval to process the same.
- Once approved, it inputs the OTP in the required filed and processes it further.
- Showing correct keypad for required input On any mobile application, on the tap on any input field the keypad pops up. The keypad of Android and iOS show alphabetic keypad as a default for every input field. The feature of "Showing correct keypad for required input" involves the following.
- The numeric keypad to be opened if the input to be entered is numeric. For example, the customer ID of HDFC bank is numeric. When a customer clicks on input filed of customer ID the numeric keypad will be opened.
- Fields where input can be alpha numeric, the default keypad will be opened.
- Auto-zoom and Auto-scroll In a normal transaction journey, the bank page opens in the following two fashions.
- Page fits in the mobile screen - In such cases, due to small size of mobile screens, the content of the page is very difficult to read. So, the customer must zoom-in into the page to see the content and tap on the input box. In Pine Labs' Plural Checkout enabled payment page, the bank page is zoomed in automatically and customer can easily enter the input to proceed with the transaction.
- The input field is not visible - Input box is not visible on the screen. In such cases, the customer must scroll left, scroll right, scroll up, and scroll down to reach the input box. With Pine Labs' Plural Checkout payment pages, input is focused, and a user does not have to scroll.
- Remember Net banking User ID It pertains to the Net Banking transactions in which the customer has given the permission to remember the Net Banking user ID. When the customer visits the application subsequently for any transaction, Net Banking user ID is shown pre-filled. Customer can the change Net Banking user ID in case he intends to transact from another user ID of the same bank.
- Auto-manual reload when page load fails When the payment page fails to load customers tends to cancel the transaction. It impacts the success rate of transaction. With Pine Labs' Plural Checkout the page reloads automatically on page load failures or the customer can reload the page.
This API reference will guide you to integrate Android Mobile SDK.
Supported Issuers
Debit card and Credit card | Net Banking |
---|---|
1. HDFC 2. ICICI 3. State Bank of India 4. Axis 5. Kotak 6. Citibank |
1. HDFC 2. ICICI 3. State Bank of India 4. Axis 5. Kotak |
Android SDK Integration Steps
Step 1: Configuration
First, developer needs to call the BrowserCheckout from checkout activity and need to pass the configuration parameters in a bundle object.
Bundle configuration= new Bundle(); configuration.putInt("environment",2); configuration.putInt("theme_id",1); configuration.putStringArrayList("return_urls",String[]); configuration.putString("post_data","https://www.pinelabs.com/make-payment"); configuration.putInt("should_start_pine_pg_loader", true/false); BrowserCheckout.openConnection (context, configuration);
1.1 Check connection status:
After developer calls the BrowserCheckout.openConnection method, he can get the connection status by calling following methods:
1.1.1 BrowserCheckout.getConnectionMessage()
Will return "success" if the service started successfully.
Or will return an error message if the service is not started.
1.1.2 BrowserCheckout.getConnectionStatus()
Will return "true" if successful connection otherwise will return "false".
Step 2: Service calling
Two parameters, object of implementation of IPinePGResponseCallback and payment parameters in json object will be required to start the browser.
BrowserCheckout.makeServiceCall(objCallBack,paymentParameters) will be used to start the browser.
objCallBack: Object of IPinePGResponseCallback interface implementation.
paymentParameters: Payment parameters to be specified in Bundle object.
2.1 IPinePGResponseCallback Callback:
Developer needs to implement the IPinePGResponseCallback for the callback to get the transaction response.
public IPinePGResponseCallback objCallBack=new IPinePGResponseCallback(){ @Override public void onPageStarted(WebView view, String url) { //will be called when webview starts loading } @Override public void onErrorOccured (int code,String message) { //will be called if any error occurs //error code and error message will be passed } @Override public void onTransactionResponse(Bundle response) { //will be called when end url is reached //Txn response will be passed in bundle object } @Override public void onWebViewReady(WebView webView) { //will be called when page finished loading } @Override public void onCancelTxn () { //will be called when user cancels the transaction } @Override public void onPressedBackButton () { //will be called when user back pressed the button } };
2.2 Payment parameters
Developer needs to pass the payment parameter in a bundle object to start the payment.
Bundle paymentParameters= new Bundle(); paymentParameters.putString("merchant_id",String); //Compulsory paymentParameters.putString("order_id",String); paymentParameters.putString("transaction_id",String); //Compulsory paymentParameters.putString("amount_in_paise",String); paymentParameters.putString("customer_id",String); paymentParameters.putString("customer_email",String); paymentParameters.putString("customer_phone_no",String);
Payment Parameters Details
Payment parameters name | Payment parameters meaning | Data Type | Details |
---|---|---|---|
environment | Environment to be used | Integer | 0 - production 1 - uat |
theme_id | Theme to be used by developer | Integer | 1 - Card view light theme default 2 - Grey theme 3 - Black and white theme 4 - Red and white theme 5 - Indigo Theme |
return_urls | url that will be considered as payment completion url and developer callback will be triggered | String array | |
post_data | Post data to start the payment | String | |
should_start_pine_pg_loader | Condition to enable or disable progress bar | boolean | true/false |
Start the service:
BrowserCheckout.makeServiceCall(objCallBack,paymentParameters)
Stop the service:
This method can be called any time to stop the browser and callback will be triggered.
BrowserCheckout.requestServiceStop()
Browser Response: Developer can access the response of BrowserCheckout by using response bundle object passed at the time of onTransactionResponse callback.
responseBundle.getBoolean("is_error_occurred"); responseBundle.getInt("error_code"); responseBundle.getString("error_message"); responseBundle.getBoolean("have_sms_permission"); responseBundle.getBoolean("is_otp_detected"); responseBundle.getBoolean("is_back_pressed"); responseBundle.getBoolean("is_otp_approved"); responseBundle.getString("start_url"); responseBundle.getString("payment_finish_time"); responseBundle.getString("payment_start_time");
Response Parameters Details
Response name | Response details | Data Type |
---|---|---|
merchant_id (required) | Pine PG merchant id | String |
order_id (optional) | String | |
transaction_id (required) | Unique txn id for the trStringion | String |
amount_in_paise (optional) | Transaction amount in paise | String |
customer_id (optional) | Customer id | String |
customer_email (optional) | Customer email | String |
customer_phone_no (optional) | Customer phone no | String |
Manifest Configuration:
Minimum Permissions Required :
android.permission.INTERNET android.permission.READ_SMS android.permission.RECEIVE_SMS android.permission.ACCESS_NETWORK_STATE