npm package for plural checkout
npm install plural-react-native
pod "PluralCheckout", git: "https://github.com/shivapinelabs/plural-ios-sdk.git"
target 'PluralCheckoutExample' do
...
pod "PluralCheckout", git: "https://github.com/shivapinelabs/plural-ios-sdk.git"
...
end
cd ios && pod install
Return type: Void
Key | Type | Required | Description |
---|---|---|---|
options | object | yes | Contains order details data. |
environment | function | yes | Contains environment details. |
SDKCallback | function | yes | Callback when any type of response is received. |
Key | Type | Required | Description |
---|---|---|---|
channelId | string | yes | It is the channel Id generated at merchant side, for merchant transaction tracking. It is required only for PreAuth and Purchase transactions. |
countryCode | number | yes | Country code which is used for mobile numbers |
emailId | string | yes | Email address of customer. |
theme | string | yes | What type of theme you want to keep (Light or Dark) |
orderToken | string | yes (no for generateHash) | Use SHA256 type of value. |
showSavedCardsFeature | boolean | yes | true for showing the saved card feature false for disabling |
mobileNumber | string | yes | Mobile number of customer |
cardCategoryType | string | yes | for chossing the type of card which can be used for payment like :- DC for debit card, CC for credit card and CC_DC for debit and credit both |
netbankingOrder | string | no | For choosing the sequence in which the netbanking banks will be displayed to the user. You send here the netbanking code in the order you want to display them like "NB1000,NB2000" or skip the field to show default order |
upiMode | string | no | Send COLLECT if you just want to show the upi collect flow, INTENT if just want to show only UPI intent flow and ALL or skip the field to show both |
authToken | string | yes | Basic authentication token generated using the merchant ID and the merchant-access-code |
import { start } from "plural-react-native";
const options = {
channelId: 'APP',
countryCode: '91',
emailId: 'example@pinelabs.com',
theme: 'Dark',
orderToken: token,
showSavedCardsFeature: false,
mobileNumber: '1234567892',
cardCategoryType: "DC",
authToken: encoded // basic authentication token generated using the merchant ID and the merchant-access-code
};
const environment = {
QA: 'QA',
UAT: 'UAT',
PROD: 'PROD',
};
const SDKCallback = () => {
// handle response here
}
start(options, environment.UAT, SDKCallback);