Non-UI Request Object
The following are My2c2pSDK field's summary along with the complete example of payment request.
- Payment Request
- Payment Request With Stored-card
- Payment Request With Recurring
- Payment Request With IPP
- Payment Request For Alternative
- Payment Request For Payment Channel
- Payment Request With Tokenize Without Authorization
- Payment Request With Samsung Pay
- Payment Request With Kanbawza Bank On Us (KBZ Bank)
Payment Request
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | version | String | Y | Version of the Payment Request | Default value is 9.1 |
2 | merchantID | String | Y | Merchant ID | - |
3 | uniqueTransactionCode | String | Y | Transaction unique invoice number. | Recommended 12 numeric number. |
4 | String | Y | Product Description | The following symbols are not allowed: !@#$%^&\*()<> (My2C2PSDK v2.8.9 and above, renamed to desc ) |
|
5 | amount | double | Y | Payment amount | The amount should be decimal point. e.g: 20 = 20.00 |
6 | currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code e.g 764 |
7 | pan | String | Y | Credit Card No | - |
8 | securityCode | String | N | Three/Four Digit CVV2/CVC2/CID value at the back of the card. |
NOT APPLICABLE for Payment Channel (3-Party) and Alternative Payments (123) |
9 | cardExpireMonth | String | Y | Credit Card Expiry month | Credit Card Expiry month in 'MM' format. |
10 | cardExpireYear | String | Y | Credit Card Expiry Year | Credit Card Expiry Year in 'YYYY' format. |
11 | cardHolderName | String | Y | Cardholder Name | - |
12 | panCountry | String | Y | Credit Card Issuer Bank Country Code | - |
13 | cardHolderEmail | String | N | Cardholder Email | - |
14 | secretKey | String | Y | secret key | Provided by 2c2p system |
15 | boolean | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is true , it is set to Production mode. if the value is false , it is set to development mode. Defaulted to false if it is not set (My2C2PSDK v2.8.9 and above, renamed to productionMode ) |
|
16 | boolean | N | PaymentUI flag | A flag to determine whether the library should display payment UI or not. Set to false for Non-UI payment . (My2C2PSDK v2.8.9 and above, renamed to paymentUI ) |
|
17 | boolean | N | Command to store cardholder data at processor. | If the value set to true , processor will response unique ID of the card data upon successful authorization. Next payment can be made by sending unique ID instead of full card information (My2C2PSDK v2.8.9 and above, renamed to storeCard ) |
|
18 | panBank | String | N | Credit Card Issuer Bank name. | - |
19 | payCategoryID | String | N | Merchant predefined payment category code for reporting | - |
20 | userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
21 | userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
22 | userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
23 | userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
24 | userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
25 | request3DS | String | N | Only accept Y , N , F . Y is using 3DS if it's available. N is not using 3DS. F is FORCE 3DS. | Default is Y |
26 | statementDescriptor | String | N | Dynamic statement description | (Optional) only allow alphanumeric in latin character. Require version 8.5 or later. |
27 | subMerchantID | String | N | Sub merchant ID | - |
28 | subMerchantList | ArrayList<SubMerchant> | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
public void requestPayment()
{
//initiate My2c2pSDK constructor with My2c2pKey
My2c2pSDK sdk = new My2c2pSDK("MIAGCSqGSIb3DQEHA6CAMIACAQAxggGoMIIBpAIBADCBizB+MQswCQYDVQQGEwJTRzELMAkGA1UECBMCU0cxEjAQBgNVBAcTCVNpbmdhcG9yZTENMAsGA1UEChMEMmMycDENMAsGA1UECxMEMmMycDEPMA0GA1UEAxMGbXkyYzJwMR8wHQYJKoZIhvcNAQkBFhBsdXNpYW5hQDJjMnAuY29tAgkA6a0e/lQFe58wDQYJKoZIhvcNAQEBBQAEggEAGMdlepae0qiHnF+dUehI49PdsH2Wr3aHoSjBvPFzKVcGNjYHEGOb8dJ40jpIIruiVUpkusI0M5zJU5icBBnSN/A3HCCyiaR/XlxqmyyjWns/Zk9VgVUVP+ewjzhtxJJS49OwQU1VhUc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PYj+TxJy/SCahFJ76+bYsHW0dKiFK3UKRctE1TGwBES5QtryInjELiEAyWxENnwBgEG9HfWqb7km6RKEX1gUeOPOcz5F8k+FFpWQe3+O2Tm89cPd6YCT7CoWRSjA5/K7rYFMZInL8xcXyShQcpLP7z0GSFeEpMZNNiRlB7s4aKJInFS89YSZETgOBPhIUyZVnrchNuoIfRXbpQWVXCMMnED0ccck5FHYMtAAAAAAAAAAAAAA==");
//set mandatory fields
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "764";
sdk.pan = "5105105105105100";
sdk.cardExpireMonth = "12";
sdk.cardExpireYear = "2019";
sdk.cardHolderName = "Mr. John";
sdk.panCountry = "TH";
sdk.secretKey = "123456";
sdk.request3DS = "Y";
//optionals
sdk.paymentUI = false; //set to false for non-UI payment
sdk.storeCard = true;
sdk.securityCode = "123";
sdk.cardHolderEmail = "user@domain.com";
sdk.panBank = "2c2p Bank";
sdk.payCategoryID = "2";
sdk.userDefined1 = "ref1";
sdk.userDefined2 = "ref2";
sdk.userDefined3 = "ref3";
sdk.userDefined4 = "ref4";
sdk.userDefined5 = "ref5";
//proceed payment
sdk.proceed(MainActivity.this, REQUEST_SDK);
}
Payment Request With Stored-card
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | version | String | Y | Version of the Payment Request | Default value is 9.1 , Payment request with stored-card. |
2 | merchantID | String | Y | Merchant ID | - |
3 | uniqueTransactionCode | String | Y | Transaction unique invoice number. | Recommended 12 numeric number. |
4 | String | Y | Product Description | The following symbols are not allowed: !@#$%^&\*()<> (My2C2PSDK v2.8.9 and above, renamed to desc ) |
|
5 | amount | double | Y | Payment amount | The amount should be decimal point. e.g: 20 = 20.00 |
6 | currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code e.g 764 |
7 | securityCode | String | N | Three/Four Digit CVV2/CVC2/CID value at the back of the card. |
NOT APPLICABLE for Payment Channel (3-Party) and Alternative Payments (123) |
8 | storedCardUniqueID | String | Y | Unique ID of store card info. | - |
9 | secretKey | String | Y | secret key | Provided by 2c2p system |
10 | boolean | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is true , it is set to Production mode. if the value is false , it is set to development mode. Defaulted to false if it is not set (My2C2PSDK v2.8.9 and above, renamed to productionMode ) |
|
11 | boolean | N | PaymentUI flag | A flag to determine whether the library should display payment UI or not. Set to false for Non-UI payment . (My2C2PSDK v2.8.9 and above, renamed to paymentUI ) |
|
12 | pan | String | N | Credit Card No | Masked pan number e.g 510510xxxxxx5100 |
13 | payCategoryID | String | N | Merchant predefined payment category code for reporting | - |
14 | userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
15 | userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
16 | userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
17 | userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
18 | userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
19 | request3DS | String | N | Only accept Y , N , F . Y is using 3DS if it's available. N is not using 3DS. F is FORCE 3DS. | Default is Y |
20 | statementDescriptor | String | N | Dynamic statement description | (Optional) only allow alphanumeric in latin character. Require version 8.5 or later. |
21 | cardHolderEmail | String | N | Cardholder Email | - |
22 | subMerchantID | String | N | Sub merchant ID | - |
23 | subMerchantList | ArrayList<SubMerchant> | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
public void requestPayment()
{
//initiate My2c2pSDK constructor with My2c2pKey
My2c2pSDK sdk = new My2c2pSDK("MIAGCSqGSIb3DQEHA6CAMIACAQAxggGoMIIBpAIBADCBizB+MQswCQYDVQQGEwJTRzELMAkGA1UECBMCU0cxEjAQBgNVBAcTCVNpbmdhcG9yZTENMAsGA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I/i/CKaYlULFwySYVuflJU4CVXVTgBz0J1T1mr9YfyDUwN+drKUGOgztsQYeAGfTyuygeqed9o3FNGrIyhC9NFsVndnQhfFosaoexUpo1PXgi94CB2hNyLF74yNFW2lyzO16zIQ01XBtZHPnhkMoB3As0qSkWSgMv1D1EFjA2o50QZxCeBI1D1OU54bGwKSFVfIjzMVN8dmwEXDfl1IwZPMqcEkSYh2Ql5udXRaoQerzoUt+wxGkLsKIF5jz0JKJjXRpNdgeVG7LbTjj6M2SEc8XPYj+TxJy/SCahFJ76+bYsHW0dKiFK3UKRctE1TGwBES5QtryInjELiEAyWxENnwBgEG9HfWqb7km6RKEX1gUeOPOcz5F8k+FFpWQe3+O2Tm89cPd6YCT7CoWRSjA5/K7rYFMZInL8xcXyShQcpLP7z0GSFeEpMZNNiRlB7s4aKJInFS89YSZETgOBPhIUyZVnrchNuoIfRXbpQWVXCMMnED0ccck5FHYMtAAAAAAAAAAAAAA==");
//set mandatory fields
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "764";
sdk.storedCardUniqueID = "174";
sdk.secretKey = "123456";
//optional
sdk.paymentUI = false; //set to false for non-UI payment
sdk.securityCode = "123";
sdk.cardHolderEmail = "user@domain.com";
sdk.pan = "510510xxxxxx5100";
sdk.payCategoryID = "2";
sdk.userDefined1 = "ref1";
sdk.userDefined2 = "ref2";
sdk.userDefined3 = "ref3";
sdk.userDefined4 = "ref4";
sdk.userDefined5 = "ref5";
sdk.request3DS = "Y";
//proceed payment
sdk.proceed(MainActivity.this, REQUEST_SDK);
}
Payment Request With Recurring
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | version | String | Y | Version of the Payment Request | Default value is 9.1 , Recurring payment request. |
2 | merchantID | String | Y | Merchant ID | - |
3 | uniqueTransactionCode | String | Y | Transaction unique invoice number. | Recommended 12 numeric number. |
4 | => desc |
String | Y | Product Description | The following symbols are not allowed: !@#$%^&\*()<> (My2C2PSDK v2.8.9 and above, renamed to desc ) |
5 | amount | double | Y | Payment amount | The amount should be decimal point. e.g: 20 = 20.00 |
6 | currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code e.g 764 |
7 | pan | String | Y | Credit Card No | - |
8 | securityCode | String | N | Three/Four Digit CVV2/CVC2/CID value at the back of the card. |
NOT APPLICABLE for Payment Channel (3-Party) and Alternative Payments (123) |
9 | cardExpireMonth | String | Y | Credit Card Expiry month | Credit Card Expiry month in 'MM' format. |
10 | cardExpireYear | String | Y | Credit Card Expiry Year | Credit Card Expiry Year in 'YYYY' format. |
11 | cardHolderName | String | Y | Cardholder Name | - |
12 | panCountry | String | Y | Credit Card Issuer Bank Country Code | - |
13 | cardHolderEmail | String | N | Cardholder Email | - |
14 | secretKey | String | Y | secret key | Provided by 2c2p system |
15 | boolean | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is true , it is set to Production mode. if the value is false , it is set to development mode. Defaulted to false if it is not set (My2C2PSDK v2.8.9 and above, renamed to productionMode ) |
|
16 | boolean | N | PaymentUI flag | A flag to determine whether the library should display payment UI or not. Set to false for Non-UI payment . (My2C2PSDK v2.8.9 and above, renamed to paymentUI ) |
|
17 | boolean | N | Command to store cardholder data at processor. | If the value set to true , processor will response unique ID of the card data upon successful authorization. Next payment can be made by sending unique ID instead of full card information (My2C2PSDK v2.8.9 and above, renamed to storeCard ) |
|
18 | panBank | String | N | Credit Card Issuer Bank name. | - |
19 | payCategoryID | String | N | Merchant predefined payment category code for reporting | - |
20 | userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
21 | userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
22 | userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
23 | userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
24 | userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
25 | boolean | Y | Command to do recurring payment | If recurring is set to true , processor will response recurring unique ID of the transaction data upon successful authorization. Next payment will be recurred by according to recurring setting. (My2C2PSDK v2.8.9 and above, renamed to recurring ) |
|
26 | invoicePrefix | String | Y | Invoice number prefix | Mandatory if recurring set to true . Invoice Prefix will be used to generate invoice no of recurring payment. System will generate with invoice prefix followed by serial no in 5 digits format (e.g 123456789012345000 01 ). |
27 | recurringAmount | double | Y | Recurring Amount | Mandatory if recurring set to true . The amount charged in recurring payment. If this value is not set, payment amount will be used for recurring payment. The amount should be decimal point. e.g: 20 = 20.00 |
28 | recurringCount | int | Y | Recurring total count allowed | Mandatory if recurring set to true . Repeat this payment x times. Value 0 for endless loop until terminated manually. |
29 | recurringInterval | int | Y | Recurring interval in days. | Mandatory if recurring set to true . Charge card every x days. Max value 365 (1 year). |
30 | boolean | N | Allow accumulation if authorization failed or not. | The value will determine to allow accumulation in next recurring cycle or not. (My2C2PSDK v2.8.9 and above, renamed to allowAccumulate ) |
|
31 | maxAccumulateAmt | double | N | Mandatory if allowAccumulate is set to true . Limit for the accumulate amount before terminate |
If the current accumulate amount exceed the limitation, the recurring cycle will be terminated. The amount should be decimal point. e.g: 20 = 20.00 |
32 | chargeNextDate | String | N | The next date of recurring payment | Date in 'DDMMYYYY' format. If it is not set, the value will be current date + recurring Interval. if recurring payment is with chargeOnDate then chargeNextDate is optional. if chargeNextDate is not set, chargeOnDate Date and Month will be used. |
33 | promotion | String | N | Promotion Code | Valid from version 8.0 onward. Promotion Code if merchant wants to perform promotion payment. (e.g Promotion Code V001 is for Visa Card holder, payment gateway will accept only Visa Card for this payment.) Merhant can set promotion by Card Type OR BIN |
34 | request3DS | String | N | Only accept Y , N , F . Y is using 3DS if it's available. N is not using 3DS. F is FORCE 3DS. | Default is Y |
35 | statementDescriptor | String | N | Dynamic statement description | (Optional) only allow alphanumeric in latin character. Require version 8.5 or later. |
36 | subMerchantID | String | N | Sub merchant ID | - |
37 | subMerchantList | ArrayList<SubMerchant> | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
38 | chargeOnDate | String | N | To charge recurring payment on specific date every month. | Date in 'ddMM' format. The MM is only used if chargeNextDate is not set. otherwise the dd will be used for every month. Only required if recurring is enabled and recurringInterval is not used. |
public void requestPayment()
{
//initiate My2c2pSDK constructor with My2c2pKey
My2c2pSDK sdk = new My2c2pSDK("MIAGCSqGSIb3DQEHA6CAMIACAQAxggGoMIIBpAIBADCBizB+MQswCQYDVQQGEwJTRzELMAkGA1UECBMCU0cxEjAQBgNVBAcTCVNpbmdhcG9yZTENMAsGA1UEChMEMmMycDENMAsGA1UECxMEMmMycDEPMA0GA1UEAxMGbXkyYzJwMR8wHQYJKoZIhvcNAQkBFhBsdXNpYW5hQDJjMnAuY29tAgkA6a0e/lQFe58wDQYJKoZIhvcNAQEBBQAEggEAGMdlepae0qiHnF+dUehI49PdsH2Wr3aHoSjBvPFzKVcGNjYHEGOb8dJ40jpIIruiVUpkusI0M5zJU5icBBnSN/A3HCCyiaR/XlxqmyyjWns/Zk9VgVUVP+ewjzhtxJJS49OwQU1VhUc/IFk+gpUQpsEJhaShMJ6Mb09Ei04lDnv5xxMkt0MjmOgIp7Jfz7xCTUXwg3AZ1eUUEoTAtpzjoMqxhXnohxxTeam3ssJZdM0+pLwmmDiltNAYkn47o7Rww1w9Lu0j6gL2ikMtlkaZ7QRwV9ItbmAnCmXKXb0gjz3dvTzPbuvvertwunjMd2TDPc/Sv839jkybv47UN0B65jCABgkqhkiG9w0BBwEwHQYJYIZIAWUDBAECBBBhkOu4ziTjJ+JLAf24bNs0oIAEggPochZHMOIhDUAz2XHl/J9QA1gueOLqd11315a5haiAUUOc6UfmSQpyvUh+CKRFp720RoYmx9bCDRa6wL65g8SX8Rcl2lzO45hQzGYHGB0Q5Rytnf8SbzENtj2BXujuDF0t7jn++JO0YVhqwB/dasW6maOeYnWqckv+k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r/gb62tE01f6yD+d9ngnQQ6BtsOTWcfPXl4Q21iRG275shQX+CoSDfG2OD3Kiw6dUOIhw8g9gchTBdOWLEh1/2+UYyadQm+kieui3dpE/pBIn0QZfs6gytIYwz8tmRdt8jBAtFoPiElJaFInafduoPWsrygtLbEsqjDOP9PV+94vJDV2MsI1nIhEhIqKqWFdPhWsFvzv6lGg3vZRO3M71eghoA7AP3uoLCdb4iytU2asN5nPD0cENu4H8fWEkroCezvLTPMujf0nU1yXw7H1qWbC0hS+dY6Tvt01MxFYBumyKt3v3lPcihtjKAe50b3+xeXcI5tThjsUROJusH6Tm4J2PNmUyLyCuVbbBak8nQ8CQi8G2Q7I/OmwqsY17RMI/i/CKaYlULFwySYVuflJU4CVXVTgBz0J1T1mr9YfyDUwN+drKUGOgztsQYeAGfTyuygeqed9o3FNGrIyhC9NFsVndnQhfFosaoexUpo1PXgi94CB2hNyLF74yNFW2lyzO16zIQ01XBtZHPnhkMoB3As0qSkWSgMv1D1EFjA2o50QZxCeBI1D1OU54bGwKSFVfIjzMVN8dmwEXDfl1IwZPMqcEkSYh2Ql5udXRaoQerzoUt+wxGkLsKIF5jz0JKJjXRpNdgeVG7LbTjj6M2SEc8XPYj+TxJy/SCahFJ76+bYsHW0dKiFK3UKRctE1TGwBES5QtryInjELiEAyWxENnwBgEG9HfWqb7km6RKEX1gUeOPOcz5F8k+FFpWQe3+O2Tm89cPd6YCT7CoWRSjA5/K7rYFMZInL8xcXyShQcpLP7z0GSFeEpMZNNiRlB7s4aKJInFS89YSZETgOBPhIUyZVnrchNuoIfRXbpQWVXCMMnED0ccck5FHYMtAAAAAAAAAAAAAA==");
//set mandatory fields
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "764";
sdk.pan = "5105105105105100";
sdk.cardExpireMonth = "12";
sdk.cardExpireYear = "2019";
sdk.cardHolderName = "Mr. John";
sdk.panCountry = "TH";
sdk.secretKey = "123456";
//Recurring
sdk.recurring = true;
//mandatory only if recurring is set to true
sdk.invoicePrefix = "pre";
sdk.recurringInterval = 7; //below 365
sdk.recurringCount = 3;
sdk.recurringAmount = 20.00;
sdk.allowAccumulate = true;
//mandatory only if allowAccumulate is set to true
sdk.maxAccumulateAmt = 100.00;
//optionals
sdk.paymentUI = false; //set to false for non-UI payment
sdk.storeCard = true;
sdk.securityCode = "123";
sdk.cardHolderEmail = "user@domain.com";
sdk.panBank = "2c2p Bank";
sdk.payCategoryID = "2";
sdk.userDefined1 = "ref1";
sdk.userDefined2 = "ref2";
sdk.userDefined3 = "ref3";
sdk.userDefined4 = "ref4";
sdk.userDefined5 = "ref5";
sdk.chargeNextDate = "17102014"; //DDMMYYYY
sdk.chargeOnDate = "1710"; //DDMM
sdk.promotion = "promo";
//proceed payment
sdk.proceed(MainActivity.this, REQUEST_SDK);
}
Payment Request With IPP
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | version | String | Y | Version of the Payment Request | Default value is 9.1 , Support installment payment request. |
2 | merchantID | String | Y | Merchant ID | - |
3 | uniqueTransactionCode | String | Y | Transaction unique invoice number. | Recommended 12 numeric number. |
4 | String | Y | Product Description | The following symbols are not allowed: !@#$%^&\*()<> (My2C2PSDK v2.8.9 and above, renamed to desc ) |
|
5 | amount | double | Y | Payment amount | The amount should be decimal point. e.g: 20 = 20.00 |
6 | currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code e.g 764 |
7 | pan | String | Y | Credit Card No | - |
8 | securityCode | String | N | Three/Four Digit CVV2/CVC2/CID value at the back of the card. |
NOT APPLICABLE for Payment Channel (3-Party) and Alternative Payments (123) |
9 | cardExpireMonth | String | Y | Credit Card Expiry month | Credit Card Expiry month in 'MM' format. |
10 | cardExpireYear | String | Y | Credit Card Expiry Year | Credit Card Expiry Year in 'YYYY' format. |
11 | cardHolderName | String | Y | Cardholder Name | - |
12 | panCountry | String | Y | Credit Card Issuer Bank Country Code | - |
13 | cardHolderEmail | String | N | Cardholder Email | - |
14 | secretKey | String | Y | secret key | Provided by 2c2p system |
15 | boolean | N | Command to store cardholder data at processor. | If the value set to true , processor will response unique ID of the card data upon successful authorization. Next payment can be made by sending unique ID instead of full card information (My2C2PSDK v2.8.9 and above, renamed to storeCard ) |
|
16 | boolean | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is true , it is set to Production mode. if the value is false , it is set to development mode. Defaulted to false if it is not set (My2C2PSDK v2.8.9 and above, renamed to productionMode ) |
|
17 | payCategoryID | String | N | Merchant predefined payment category code for reporting | - |
18 | panBank | String | N | Credit Card Issuer Bank name. | - |
19 | userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
20 | userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
21 | userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
22 | userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
23 | userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
24 | boolean | N | PaymentUI flag | A flag to determine whether the library should display payment UI or not. Set to false for Non-UI payment . (My2C2PSDK v2.8.9 and above, renamed to paymentUI ) |
|
25 | boolean | Y | Command to do installment payment | If ippTransaction value is true , processor will process the installment payment. (My2C2PSDK v2.8.9 and above, renamed to ippTransaction ) |
|
26 | installmentPeriod | int | Y | Valid installment period provided by 2c2p | Mandatory if ippTransaction flag is set to true |
27 | interestType | String | Y | Interest type of value of 'C' or 'M' |
Mandatory if ippTransaction flag is set to true C - Customer Pay Interest M - Merchant Pay Interest |
28 | request3DS | String | N | Only accept Y , N , F . Y is using 3DS if it's available. N is not using 3DS. F is FORCE 3DS. | Default is Y |
29 | statementDescriptor | String | N | Dynamic statement description | (Optional) only allow alphanumeric in latin character. Require version 8.5 or later. |
30 | promotion | String | N | Promotion Code | Valid from version 8.0 onward. Promotion Code if merchant wants to perform promotion payment. (e.g Promotion Code V001 is for Visa Card holder, payment gateway will accept only Visa Card for this payment.) Merhant can set promotion by Card Type OR BIN |
31 | productCode | String | N | Product Code for the payment. | - |
32 | subMerchantID | String | N | Sub merchant ID | - |
33 | subMerchantList | ArrayList<SubMerchant> | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
public void requestPayment()
{
//initiate My2c2pSDK constructor with My2c2pKey
My2c2pSDK sdk = new My2c2pSDK("MIAGCSqGSIb3DQEHA6CAMIACAQAxggGoMIIBpAIBADCBizB+MQswCQYDVQQGEwJTRzELMAkGA1UECBMCU0cxEjAQBgNVBAcTCVNpbmdhcG9yZTENMAsGA1UEChMEMmMycDENMAsGA1UECxMEMmMycDEPMA0GA1UEAxMGbXkyYzJwMR8wHQYJKoZIhvcNAQkBFhBsdXNpYW5hQDJjMnAuY29tAgkA6a0e/lQFe58wDQYJKoZIhvcNAQEBBQAEggEAGMdlepae0qiHnF+dUehI49PdsH2Wr3aHoSjBvPFzKVcGNjYHEGOb8dJ40jpIIruiVUpkusI0M5zJU5icBBnSN/A3HCCyiaR/XlxqmyyjWns/Zk9VgVUVP+ewjzhtxJJS49OwQU1VhUc/IFk+gpUQpsEJhaShMJ6Mb09Ei04lDnv5xxMkt0MjmOgIp7Jfz7xCTUXwg3AZ1eUUEoTAtpzjoMqxhXnohxxTeam3ssJZdM0+pLwmmDiltNAYkn47o7Rww1w9Lu0j6gL2ikMtlkaZ7QRwV9ItbmAnCmXKXb0gjz3dvTzPbuvvertwunjMd2TDPc/Sv839jkybv47UN0B65jCABgkqhkiG9w0BBwEwHQYJYIZIAWUDBAECBBBhkOu4ziTjJ+JLAf24bNs0oIAEggPochZHMOIhDUAz2XHl/J9QA1gueOLqd11315a5haiAUUOc6UfmSQpyvUh+CKRFp720RoYmx9bCDRa6wL65g8SX8Rcl2lzO45hQzGYHGB0Q5Rytnf8SbzENtj2BXujuDF0t7jn++JO0YVhqw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GvH565QHTSDSG0G8WFUr/gb62tE01f6yD+d9ngnQQ6BtsOTWcfPXl4Q21iRG275shQX+CoSDfG2OD3Kiw6dUOIhw8g9gchTBdOWLEh1/2+UYyadQm+kieui3dpE/pBIn0QZfs6gytIYwz8tmRdt8jBAtFoPiElJaFInafduoPWsrygtLbEsqjDOP9PV+94vJDV2MsI1nIhEhIqKqWFdPhWsFvzv6lGg3vZRO3M71eghoA7AP3uoLCdb4iytU2asN5nPD0cENu4H8fWEkroCezvLTPMujf0nU1yXw7H1qWbC0hS+dY6Tvt01MxFYBumyKt3v3lPcihtjKAe50b3+xeXcI5tThjsUROJusH6Tm4J2PNmUyLyCuVbbBak8nQ8CQi8G2Q7I/OmwqsY17RMI/i/CKaYlULFwySYVuflJU4CVXVTgBz0J1T1mr9YfyDUwN+drKUGOgztsQYeAGfTyuygeqed9o3FNGrIyhC9NFsVndnQhfFosaoexUpo1PXgi94CB2hNyLF74yNFW2lyzO16zIQ01XBtZHPnhkMoB3As0qSkWSgMv1D1EFjA2o50QZxCeBI1D1OU54bGwKSFVfIjzMVN8dmwEXDfl1IwZPMqcEkSYh2Ql5udXRaoQerzoUt+wxGkLsKIF5jz0JKJjXRpNdgeVG7LbTjj6M2SEc8XPYj+TxJy/SCahFJ76+bYsHW0dKiFK3UKRctE1TGwBES5QtryInjELiEAyWxENnwBgEG9HfWqb7km6RKEX1gUeOPOcz5F8k+FFpWQe3+O2Tm89cPd6YCT7CoWRSjA5/K7rYFMZInL8xcXyShQcpLP7z0GSFeEpMZNNiRlB7s4aKJInFS89YSZETgOBPhIUyZVnrchNuoIfRXbpQWVXCMMnED0ccck5FHYMtAAAAAAAAAAAAAA==");
//set mandatory fields
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "764";
sdk.pan = "5105105105105100";
sdk.cardExpireMonth = "12";
sdk.cardExpireYear = "2019";
sdk.cardHolderName = "Mr. John";
sdk.panCountry = "TH";
sdk.secretKey = "123456";
//IPP
sdk.ippTransaction = true;
//mandatory only if ippTransaction is set to true
sdk.installmentPeriod = 3;
sdk.interestType = "C"; //C or M
//optionals - ipp
sdk.promotion = "Happy1";
sdk.productCode = "ProductA";
//optionals
sdk.paymentUI = false; //set to false for non-UI payment
sdk.storeCard = true;
sdk.securityCode = "123";
sdk.cardHolderEmail = "user@domain.com";
sdk.panBank = "2c2p Bank";
sdk.payCategoryID = "2";
sdk.userDefined1 = "ref1";
sdk.userDefined2 = "ref2";
sdk.userDefined3 = "ref3";
sdk.userDefined4 = "ref4";
sdk.userDefined5 = "ref5";
sdk.storedCardUniqueID = "174"; // set for request with stored-card if needed
//proceed payment
sdk.proceed(MainActivity.this, REQUEST_SDK);
}
Payment Request For Alternative
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | version | String | Y | Version of the Payment Request | Default value is 9.1 , Payment request with Payment Channel. |
2 | merchantID | String | Y | Merchant ID | - |
3 | uniqueTransactionCode | String | Y | Transaction unique invoice number. | Recommended 12 numeric number. |
4 | String | Y | Product Description | The following symbols are not allowed: !@#$%^&\*()<> (My2C2PSDK v2.8.9 and above, renamed to desc ) |
|
5 | amount | double | Y | Payment amount | The amount should be decimal point. e.g: 20 = 20.00 |
6 | currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code e.g 764 |
7 | secretKey | String | Y | secret key | Provided by 2c2p system |
8 | boolean | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is true , it is set to Production mode. if the value is false , it is set to development mode. Defaulted to false if it is not set (My2C2PSDK v2.8.9 and above, renamed to productionMode ) |
|
9 | payCategoryID | String | N | Merchant predefined payment category code for reporting | - |
10 | userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
11 | userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
12 | userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
13 | userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
14 | userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
15 | paymentChannel | PaymentChannel | Y | ONE_TWO_THREE |
Refer to Payment Channel Note : Must target API version 9.1 and above. |
16 | cardHolderName | String | Y | Payer Name for the 123 | - |
17 | cardHolderEmail | String | Y | Payer Email for the 123 | - |
18 | agentCode | String | Y | agentCode for the 123 | - |
19 | channelCode | String | N | channelCode for the 123 | It's required for Bank and Kiosk . |
20 | paymentExpiry | String | N | payment expiry date for the 123 | - |
21 | mobileNo | String | N | mobile no for 123 | - |
22 | subMerchantID | String | N | Sub merchant ID | - |
23 | subMerchantList | ArrayList<SubMerchant> | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
public void requestPayment()
{
//initiate My2c2pSDK constructor with My2c2pKey
My2c2pSDK sdk = new My2c2pSDK("MIAGCSqGSIb3DQEHA6CAMIACAQAxggGoMIIBpAIBADCBizB+MQswCQYDVQQGEwJTRzELMAkGA1UECBMCU0cxEjAQBgNVBAcTCVNpbmdhcG9yZTENMAsGA1UEChMEMmMycDENMAsGA1UECxMEMmMycDEPMA0GA1UEAxMGbXkyYzJwMR8wHQYJKoZIhvcNAQkBFhBsdXNpYW5hQDJjMnAuY29tAgkA6a0e/lQFe58wDQYJKoZIhvcNAQEBBQAEggEAGMdlepae0qiHnF+dUehI49PdsH2Wr3aHoSjBvPFzKVcGNjYHEGOb8dJ40jpIIruiVUpkusI0M5zJU5icBBnSN/A3HCCyiaR/XlxqmyyjWns/Zk9VgVUVP+ewjzhtxJJS49OwQU1VhUc/IFk+gpUQpsEJhaShMJ6Mb09Ei04lDnv5xxMkt0MjmOgIp7Jfz7xCTUXwg3AZ1eUUEoTAtpzjoMqxhXnohxxTeam3ssJZdM0+pLwmmDiltNAYkn47o7Rww1w9Lu0j6gL2ikMtlkaZ7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7z0GSFeEpMZNNiRlB7s4aKJInFS89YSZETgOBPhIUyZVnrchNuoIfRXbpQWVXCMMnED0ccck5FHYMtAAAAAAAAAAAAAA==");
//set mandatory fields
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "840";
sdk.secretKey = "123456";
sdk.cardHolderName = "Mr. John";
sdk.cardHolderEmail = "user@domain.com";
//set 123 mandatory fields
sdk.paymentUI = false;
sdk.paymentChannel = PaymentChannel.ONE_TWO_THREE; //Refer My2c2pSDK.PaymentChannel class
sdk.agentCode = "SCB";
sdk.channelCode = "ATM";
//optionals
sdk.paymentExpiry = "";
sdk.mobileNo = "";
sdk.payCategoryID = "2";
sdk.userDefined1 = "ref1";
sdk.userDefined2 = "ref2";
sdk.userDefined3 = "ref3";
sdk.userDefined4 = "ref4";
sdk.userDefined5 = "ref5";
//proceed payment
sdk.proceed(MainActivity.this, REQUEST_SDK);
}
Payment Request For Payment Channel
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | version | String | Y | Version of the Payment Request | Default value is 9.1 , Payment request with Payment Channel. |
2 | merchantID | String | Y | Merchant ID | - |
3 | uniqueTransactionCode | String | Y | Transaction unique invoice number. | Recommended 12 numeric number. |
4 | String | Y | Product Description | The following symbols are not allowed: !@#$%^&\*()<> (My2C2PSDK v2.8.9 and above, renamed to desc ) |
|
5 | amount | double | Y | Payment amount | The amount should be decimal point. e.g: 20 = 20.00 |
6 | currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code e.g 764 |
7 | secretKey | String | Y | secret key | Provided by 2c2p system |
8 | boolean | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is true , it is set to Production mode. if the value is false , it is set to development mode. Defaulted to false if it is not set (My2C2PSDK v2.8.9 and above, renamed to productionMode ) |
|
9 | payCategoryID | String | N | Merchant predefined payment category code for reporting | - |
10 | userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
11 | userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
12 | userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
13 | userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
14 | userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
15 | paymentChannel | PaymentChannel | Y | PaymentChannel for 3rd-Party Payments Options. | Refer to Payment Channel e.g ALIPAY Note : Must target API version 8.4 and above. |
16 | subMerchantID | String | N | Sub merchant ID | - |
17 | subMerchantList | ArrayList<SubMerchant> | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
18 | cardHolderName | String | Y | Payer Name | - |
19 | cardHolderEmail | String | N | Payer Email | - |
20 | mobileNo | String | N | Payer Mobile No. | - |
21 | accountNo | String | C | Payer Account No. | e.g: PaymentChannel.TRUE_MONEY PaymentChannel.OK_DOLLAR PaymentChannel.WAVEPAY |
public void requestPayment()
{
//initiate My2c2pSDK constructor with My2c2pKey
My2c2pSDK sdk = new My2c2pSDK("MIAGCSqGSIb3DQEHA6CAMIACAQAxggGoMIIBpAIBADCBizB+MQswCQYDVQQGEwJTRzELMAkGA1UECBMCU0cxEjAQBgNVBAcTCVNpbmdhcG9yZTENMAsGA1UEChMEMmMycDENMAsGA1UECxMEMmMycDEPMA0GA1UEAxMGbXkyYzJwMR8wHQYJKoZIhvcNAQkBFhBsdXNpYW5hQDJjMnAuY29tAgkA6a0e/lQFe58wDQYJKoZIhvcNAQEBBQAEggEAGMdlepae0qiHnF+dUehI49PdsH2Wr3aHoSjBvPFzKVcGNjYHEGOb8dJ40jpIIruiVUpkusI0M5zJU5icBBnSN/A3HCCyiaR/XlxqmyyjWns/Zk9VgVUVP+ewjzhtxJJS49OwQU1VhUc/IFk+gpUQpsEJhaShMJ6Mb09Ei04lDnv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ctE1TGwBES5QtryInjELiEAyWxENnwBgEG9HfWqb7km6RKEX1gUeOPOcz5F8k+FFpWQe3+O2Tm89cPd6YCT7CoWRSjA5/K7rYFMZInL8xcXyShQcpLP7z0GSFeEpMZNNiRlB7s4aKJInFS89YSZETgOBPhIUyZVnrchNuoIfRXbpQWVXCMMnED0ccck5FHYMtAAAAAAAAAAAAAA==");
//set mandatory fields
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "840";
sdk.secretKey = "123456";
//mandatory for Payment Channel
sdk.paymentChannel = PaymentChannel.ALIPAY; //Refer My2c2pSDK.PaymentChannel class
//mandatory for certain Payment Channel
sdk.accountNo = "088888888";
//optionals
sdk.cardHolderName = "Mr. John";
sdk.cardHolderEmail = "user@domain.com";
sdk.mobileNo = "088888888";
sdk.payCategoryID = "2";
sdk.userDefined1 = "ref1";
sdk.userDefined2 = "ref2";
sdk.userDefined3 = "ref3";
sdk.userDefined4 = "ref4";
sdk.userDefined5 = "ref5";
//proceed payment
sdk.proceed(MainActivity.this, REQUEST_SDK);
}
Payment Request With Tokenize Without Authorization
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | version | String | Y | Version of the Payment Request | Default value is 9.1 |
2 | merchantID | String | Y | Merchant ID | - |
3 | pan | String | Y | Credit Card No | - |
4 | cardExpireMonth | String | Y | Credit Card Expiry month | Credit Card Expiry month in 'MM' format. |
5 | cardExpireYear | String | Y | Credit Card Expiry Year | Credit Card Expiry Year in 'YYYY' format. |
6 | cardHolderName | String | Y | Cardholder Name | - |
7 | cardHolderEmail | String | N | Cardholder Email | - |
8 | panCountry | String | N | Credit Card Issuer Bank Country Code | - |
9 | secretKey | String | Y | secret key | Provided by 2c2p system |
10 | boolean | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is true , it is set to Production mode. if the value is false , it is set to development mode. Defaulted to false if it is not set (My2C2PSDK v2.8.9 and above, renamed to productionMode ) |
|
11 | boolean | N | PaymentUI flag | A flag to determine whether the library should display payment UI or not. Set to false for Non-UI payment . (My2C2PSDK v2.8.9 and above, renamed to paymentUI ) |
|
12 | panBank | String | N | Credit Card Issuer Bank name. | - |
13 | tokenizeWithoutAuthorization | boolean | Y | To only tokenize card without authorization | true - Perform tokenization. false - Perform normal authorization. |
14 | request3DS | String | N | Only accept Y , N , F . Y is using 3DS if it's available. N is not using 3DS. F is FORCE 3DS. | Default is Y |
15 | subMerchantID | String | N | Sub merchant ID | - |
public void requestPayment()
{
//initiate My2c2pSDK constructor with My2c2pKey
My2c2pSDK sdk = new My2c2pSDK("MIAGCSqGSIb3DQEHA6CAMIACAQAxggGoMIIBpAIBADCBizB+MQswCQYDVQQGEwJTRzELMAkGA1UECBMCU0cxEjAQBgNVBAcTCVNpbmdhcG9yZTENMAsGA1UEChMEMmMycDENMAsGA1UECxMEMmMycDEPMA0GA1UEAxMGbXkyYzJwMR8wHQYJKoZIhvcNAQkBFhBsdXNpYW5hQDJjMnAuY29tAgkA6a0e/lQFe58wDQYJKoZIhvcNAQEBBQAEggEAGMdlepae0qiHnF+dUehI49PdsH2Wr3aHoSjBvPFzKVcGNjYHEGOb8dJ40jpIIruiVUpkusI0M5zJU5icBBnSN/A3HCCyiaR/XlxqmyyjWns/Zk9VgVUVP+ewjzhtxJJS49OwQU1VhUc/IFk+gpUQpsEJhaShMJ6Mb09Ei04lDnv5xxMkt0MjmOgIp7Jfz7xCTUXwg3AZ1eUUEoTAtpzjoMqxhXnohxxTeam3ssJZdM0+pLwmmDiltNAYkn47o7Rww1w9Lu0j6gL2ikMtlkaZ7QRwV9ItbmAnCmXKXb0gjz3dvTzPbuvvertwunjMd2TDPc/Sv839jkybv47UN0B65jCABgkqhkiG9w0BBwEwHQYJYIZIAWUDBAECBBBhkOu4ziTjJ+JLAf24bNs0oIAEggPochZHMOIhDUAz2XHl/J9QA1gueOLqd11315a5haiAUUOc6UfmSQpyvUh+C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yWSSZJJGCpycRKFFHLq8Z9u20zwIMn3CDcsQ2tV++atNDTia41HZ2Kuz5TaaXOrPjZMaP8rfc3LNfbXil1GvH565QHTSDSG0G8WFUr/gb62tE01f6yD+d9ngnQQ6BtsOTWcfPXl4Q21iRG275shQX+CoSDfG2OD3Kiw6dUOIhw8g9gchTBdOWLEh1/2+UYyadQm+kieui3dpE/pBIn0QZfs6gytIYwz8tmRdt8jBAtFoPiElJaFInafduoPWsrygtLbEsqjDOP9PV+94vJDV2MsI1nIhEhIqKqWFdPhWsFvzv6lGg3vZRO3M71eghoA7AP3uoLCdb4iytU2asN5nPD0cENu4H8fWEkroCezvLTPMujf0nU1yXw7H1qWbC0hS+dY6Tvt01MxFYBumyKt3v3lPcihtjKAe50b3+xeXcI5tThjsUROJusH6Tm4J2PNmUyLyCuVbbBak8nQ8CQi8G2Q7I/OmwqsY17RMI/i/CKaYlULFwySYVuflJU4CVXVTgBz0J1T1mr9YfyDUwN+drKUGOgztsQYeAGfTyuygeqed9o3FNGrIyhC9NFsVndnQhfFosaoexUpo1PXgi94CB2hNyLF74yNFW2lyzO16zIQ01XBtZHPnhkMoB3As0qSkWSgMv1D1EFjA2o50QZxCeBI1D1OU54bGwKSFVfIjzMVN8dmwEXDfl1IwZPMqcEkSYh2Ql5udXRaoQerzoUt+wxGkLsKIF5jz0JKJjXRpNdgeVG7LbTjj6M2SEc8XPYj+TxJy/SCahFJ76+bYsHW0dKiFK3UKRctE1TGwBES5QtryInjELiEAyWxENnwBgEG9HfWqb7km6RKEX1gUeOPOcz5F8k+FFpWQe3+O2Tm89cPd6YCT7CoWRSjA5/K7rYFMZInL8xcXyShQcpLP7z0GSFeEpMZNNiRlB7s4aKJInFS89YSZETgOBPhIUyZVnrchNuoIfRXbpQWVXCMMnED0ccck5FHYMtAAAAAAAAAAAAAA==");
//set mandatory fields
sdk.merchantID = "JT01";
sdk.pan = "5105105105105100";
sdk.cardExpireMonth = "12";
sdk.cardExpireYear = "2019";
sdk.cardHolderName = "Mr. John";
sdk.secretKey = "123456";
sdk.tokenizeWithoutAuthorization = true;
//optional
sdk.paymentUI = false;
sdk.cardHolderEmail = "user@domain.com";
sdk.panCountry = "SG";
sdk.panBank = "2c2p Bank";
sdk.request3DS = "Y";
//proceed payment
sdk.proceed(MainActivity.this, REQUEST_SDK);
}
Payment Request With Samsung Pay
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | version | String | Y | Version of the Payment Request | Default value is 9.1 , Payment request with Payment Channel. |
2 | merchantID | String | Y | Merchant ID | - |
3 | uniqueTransactionCode | String | Y | Transaction unique invoice number. | Recommended 12 numeric number. |
4 | String | Y | Product Description | The following symbols are not allowed: !@#$%^&\*()<> (My2C2PSDK v2.8.9 and above, renamed to desc ) |
|
5 | amount | double | Y | Payment amount | The amount should be decimal point. e.g: 20 = 20.00 |
6 | currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code e.g 764 |
7 | secretKey | String | Y | secret key | Provided by 2c2p system |
8 | boolean | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is true , it is set to Production mode. if the value is false , it is set to development mode. Defaulted to false if it is not set (My2C2PSDK v2.8.9 and above, renamed to productionMode ) |
|
9 | boolean | N | PaymentUI flag | A flag to determine whether the library should display payment UI or not. Set to false for Non-UI payment . (My2C2PSDK v2.8.9 and above, renamed to paymentUI ) |
|
10 | payCategoryID | String | N | Merchant predefined payment category code for reporting | - |
11 | userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
12 | userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
13 | userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
14 | userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
15 | userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
16 | paymentChannel | PaymentChannel | Y | SAMSUNG_PAY |
Refer to Payment Channel Note : Must target API version 9.1 and above. |
17 | subMerchantID | String | N | Sub merchant ID | - |
18 | samsungPayServiceId | String | Y | Samsung Pay service ID | Provided by 2c2p. |
19 | samsungPayMerchantName | String | Y | Samsung Pay merchant name | Provided by 2c2p. |
20 | subMerchantList | ArrayList<SubMerchant> | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
public void requestPayment()
{
//initiate My2c2pSDK constructor with My2c2pKey
My2c2pSDK sdk = new My2c2pSDK("MIAGCSqGSIb3DQEHA6CAMIACAQAxggGoMIIBpAIBADCBizB+MQswCQYDVQQGEwJTRzELMAkGA1UECBMCU0cxEjAQBgNVBAcTCVNpbmdhcG9yZTENMAsGA1UEChMEMmMycDENMAsGA1UECxMEMmMycDEPMA0GA1UEAxMGbXkyYzJwMR8wHQYJKoZIhvcNAQkBFhBsdXNpYW5hQDJjMnAuY29tAgkA6a0e/lQFe58wDQYJKoZIhvcNAQEBBQAEggEAGMdlepae0qiHnF+dUehI49PdsH2Wr3aHoSjBvPFzKVcGNjYHEGOb8dJ40jpIIruiVUpkusI0M5zJU5icBBnSN/A3HCCyiaR/XlxqmyyjWns/Zk9VgVUVP+ewjzhtxJJS49OwQU1VhUc/IFk+gpUQpsEJhaShMJ6Mb09Ei04lDnv5xxMkt0MjmOgIp7Jfz7xCTUXwg3AZ1eUUEoTAtpzjoMqxhXnohxxTeam3ssJZdM0+pLwmmDiltNAYkn47o7Rww1w9Lu0j6gL2ikMtlkaZ7QRwV9ItbmAnCmXKXb0gjz3dvTzPbuvvertwunjMd2TDPc/Sv839jkybv47UN0B65jCABgkqhkiG9w0BBwEwHQYJYIZIAWUDBAECBBBhkOu4ziTjJ+JLAf24bNs0oIAEggPochZHMOIhDUAz2XHl/J9QA1gueOLqd11315a5haiAUUOc6UfmSQpyvUh+CKRFp720RoYmx9bCDRa6wL65g8SX8Rcl2lzO45hQzGYHGB0Q5Rytnf8SbzENtj2BX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PjZMaP8rfc3LNfbXil1GvH565QHTSDSG0G8WFUr/gb62tE01f6yD+d9ngnQQ6BtsOTWcfPXl4Q21iRG275shQX+CoSDfG2OD3Kiw6dUOIhw8g9gchTBdOWLEh1/2+UYyadQm+kieui3dpE/pBIn0QZfs6gytIYwz8tmRdt8jBAtFoPiElJaFInafduoPWsrygtLbEsqjDOP9PV+94vJDV2MsI1nIhEhIqKqWFdPhWsFvzv6lGg3vZRO3M71eghoA7AP3uoLCdb4iytU2asN5nPD0cENu4H8fWEkroCezvLTPMujf0nU1yXw7H1qWbC0hS+dY6Tvt01MxFYBumyKt3v3lPcihtjKAe50b3+xeXcI5tThjsUROJusH6Tm4J2PNmUyLyCuVbbBak8nQ8CQi8G2Q7I/OmwqsY17RMI/i/CKaYlULFwySYVuflJU4CVXVTgBz0J1T1mr9YfyDUwN+drKUGOgztsQYeAGfTyuygeqed9o3FNGrIyhC9NFsVndnQhfFosaoexUpo1PXgi94CB2hNyLF74yNFW2lyzO16zIQ01XBtZHPnhkMoB3As0qSkWSgMv1D1EFjA2o50QZxCeBI1D1OU54bGwKSFVfIjzMVN8dmwEXDfl1IwZPMqcEkSYh2Ql5udXRaoQerzoUt+wxGkLsKIF5jz0JKJjXRpNdgeVG7LbTjj6M2SEc8XPYj+TxJy/SCahFJ76+bYsHW0dKiFK3UKRctE1TGwBES5QtryInjELiEAyWxENnwBgEG9HfWqb7km6RKEX1gUeOPOcz5F8k+FFpWQe3+O2Tm89cPd6YCT7CoWRSjA5/K7rYFMZInL8xcXyShQcpLP7z0GSFeEpMZNNiRlB7s4aKJInFS89YSZETgOBPhIUyZVnrchNuoIfRXbpQWVXCMMnED0ccck5FHYMtAAAAAAAAAAAAAA==");
//set mandatory fields
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "840";
sdk.secretKey = "123456";
sdk.paymentUI = false;
//set Samsung Pay mandatory fields
sdk.paymentChannel = PaymentChannel.SAMSUNG_PAY; //Refer My2c2pSDK.PaymentChannel class
sdk.samsungPayServiceId = "";
sdk.samsungPayMerchantName = "";
//proceed payment
sdk.proceed(MainActivity.this, REQUEST_SDK);
}
Payment Request with Kanbawza Bank On Us (KBZ Bank)
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | version | String | Y | Version of the Payment Request | Default value is 9.1 |
2 | merchantID | String | Y | Merchant ID | - |
3 | uniqueTransactionCode | String | Y | Transaction unique invoice number. | Recommended 12 numeric number. |
4 | String | Y | Product Description | The following symbols are not allowed: !@#$%^&\*()<> (My2C2PSDK v2.8.9 and above, renamed to desc ) |
|
5 | amount | double | Y | Payment amount | The amount should be decimal point. e.g: 20 = 20.00 |
6 | currencyCode | String | Y | Standard ISO4217 currency codes |
Refer to Currency Code e.g 764 |
7 | pan | String | Y | Credit Card No | Only accept KBZ cards. |
8 | cardPin | String | Y | Card Pin No. | For KBZ on us. |
9 | cardExpireMonth | String | Y | Credit Card Expiry month | Credit Card Expiry month in 'MM' format. |
10 | cardExpireYear | String | Y | Credit Card Expiry Year | Credit Card Expiry Year in 'YYYY' format. |
11 | cardHolderName | String | Y | Cardholder Name | - |
12 | panCountry | String | Y | Credit Card Issuer Bank Country Code | Only accept MM for pan country. |
13 | cardHolderEmail | String | N | Cardholder Email | - |
14 | secretKey | String | Y | secret key | Provided by 2c2p system |
15 | boolean | N | Production/development flag | A flag to determine whether the url being used is in production mode or development mode. If the value is true , it is set to Production mode. if the value is false , it is set to development mode. Defaulted to false if it is not set (My2C2PSDK v2.8.9 and above, renamed to productionMode ) |
|
16 | boolean | N | PaymentUI flag | A flag to determine whether the library should display payment UI or not. Set to false for Non-UI payment . (My2C2PSDK v2.8.9 and above, renamed to paymentUI ) |
|
17 | panBank | String | N | Credit Card Issuer Bank name. | Only accept KBZ for pan bank. |
18 | payCategoryID | String | N | Merchant predefined payment category code for reporting | - |
19 | userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
20 | userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
21 | userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
22 | userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
23 | userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
24 | statementDescriptor | String | N | Dynamic statement description | (Optional) only allow alphanumeric in latin character. Require version 8.5 or later. |
25 | subMerchantID | String | N | Sub merchant ID | - |
26 | subMerchantList | ArrayList<SubMerchant> | N | Sub Merchants of Master Merchant | Mandatory for Merchant ID is Master Merchant type . Require version 9.4 or later. |
27 | paymentChannel | PaymentChannel | Y | - | Only accept KBZ for Kanbawza Bank On Us Payment Request. |
public void requestPayment()
{
//initiate My2c2pSDK constructor with My2c2pKey
My2c2pSDK sdk = new My2c2pSDK("MIAGCSqGSIb3DQEHA6CAMIACAQAxggGoMIIBpAIBADCBizB+MQswCQYDVQQGEwJTRzELMAkGA1UECBMCU0cxEjAQBgNVBAcTCVNpbmdhcG9yZTENMAsGA1UEChMEMmMycDENMAsGA1UECxMEMmMycDEPMA0GA1UEAxMGbXkyYzJwMR8wHQYJKoZIhvcNAQkBFhBsdXNpYW5hQDJjMnAuY29tAgkA6a0e/lQFe58wDQYJKoZIhvcNAQEBBQAEggEAGMdlepae0qiHnF+dUehI49PdsH2Wr3aHoSjBvPFzKVcGNjYHEGOb8dJ40jpIIruiVUpkusI0M5zJU5icBBnSN/A3HCCyiaR/XlxqmyyjWns/Zk9VgVUVP+ewjzhtxJJS49OwQU1VhUc/IFk+gpUQpsEJhaShMJ6Mb09Ei04lDnv5xxMkt0MjmOgIp7Jfz7xCTUXwg3AZ1eUUEoTAtpzjoMqxhXnohxxTeam3ssJZdM0+pLwmmDiltNAYkn47o7Rww1w9Lu0j6gL2ikMtlkaZ7QRwV9ItbmAnCmXKXb0gjz3dvTzPb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SZETgOBPhIUyZVnrchNuoIfRXbpQWVXCMMnED0ccck5FHYMtAAAAAAAAAAAAAA==");
//set mandatory fields
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "764";
sdk.pan = "5105105105105100";
sdk.cardExpireMonth = "12";
sdk.cardExpireYear = "2019";
sdk.cardHolderName = "Mr. John";
sdk.panCountry = "MM";
sdk.secretKey = "123456";
//mandatory for KBZ
sdk.cardPin = "123456";
sdk.paymentChannel = PaymentChannel.KBZ;
//set optional fields
sdk.cardHolderEmail = "user@domain.com";
//proceed payment
sdk.proceed(MainActivity.this, REQUEST_SDK);
}