UI Request Object
The following are My2c2pSDK field's summary along with the complete example of the payment request with UI.
- Payment Request
- Payment Request With Stored-card
- Payment Request With Recurring
- Payment Request With IPP
- Payment Request With Payment Option
- Payment Request With Tokenize Without Authorization
Payment Request
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | 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 ) |
|
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 | 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 ) |
|
8 | cardHolderName | String | N | Cardholder Name | - |
9 | cardHolderEmail | String | N | Cardholder Email | - |
10 | boolean | N | Enable store card's flag | A boolean value to determine whether to enable the save store card option or not.If set to true , the payment form will display the option to save the store card.Defaulted to false if it is not set.If storeCardUniqueID is not empty , this value will be ignored. (My2C2PSDK v2.8.9 and above, renamed to enableStoreCard ) |
|
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 | 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 |
17 | subMerchantID | String | N | Sub merchant ID | - |
18 | 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++JO0YVhqwB/dasW6maOeYnWqckv+kltTpILJ51sYbZV5gCbIVKzMyQmZef4rmVlbgC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Q21iRG275shQX+CoSDfG2OD3Kiw6dUOIhw8g9gchTBdOWLEh1/2+UYyadQm+kieui3dpE/pBIn0QZfs6gytIYwz8tmRdt8jBAtFoPiElJaFInafduoPWsrygtLbEsqjDOP9PV+94vJDV2MsI1nIhEhIqKqWFdPhWsFvzv6lGg3vZRO3M71eghoA7AP3uoLCdb4iytU2asN5nPD0cENu4H8fWEkroCezvLTPMujf0nU1yXw7H1qWbC0hS+dY6Tvt01MxFYBumyKt3v3lPcihtjKAe50b3+xeXcI5tThjsUROJusH6Tm4J2PNmUyLyCuVbbBak8nQ8CQi8G2Q7I/OmwqsY17RMI/i/CKaYlULFwySYVuflJU4CVXVTgBz0J1T1mr9YfyDUwN+drKUGOgztsQYeAGfTyuygeqed9o3FNGrIyhC9NFsVndnQhfFosaoexUpo1PXgi94CB2hNyLF74yNFW2lyzO16zIQ01XBtZHPnhkMoB3As0qSkWSgMv1D1EFjA2o50QZxCeBI1D1OU54bGwKSFVfIjzMVN8dmwEXDfl1IwZPMqcEkSYh2Ql5udXRaoQerzoUt+wxGkLsKIF5jz0JKJjXRpNdgeVG7LbTjj6M2SEc8XPYj+TxJy/SCahFJ76+bYsHW0dKiFK3UKRctE1TGwBES5QtryInjELiEAyWxENnwBgEG9HfWqb7km6RKEX1gUeOPOcz5F8k+FFpWQe3+O2Tm89cPd6YCT7CoWRSjA5/K7rYFMZInL8xcXyShQcpLP7z0GSFeEpMZNNiRlB7s4aKJInFS89YSZETgOBPhIUyZVnrchNuoIfRXbpQWVXCMMnED0ccck5FHYMtAAAAAAAAAAAAAA==");
//set mandatory fields
sdk.paymentUI = true; //set to true for UI payment
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "764";
//optionals
sdk.cardHolderName = "Mr. John";
sdk.cardHolderEmail = "john@email.com";
sdk.enableStoreCard = true;
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 Stored-card
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | 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 ) |
|
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 | storedCardUniqueID | String | Y | Unique ID of store card info. |
- |
8 | pan | String | N | Credit Card No | Masked pan number e.g 510510xxxxxx5100 |
9 | 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 ) |
|
10 | cardHolderName | String | N | Cardholder Name | - |
11 | cardHolderEmail | String | N | Cardholder Email | - |
12 | boolean | N | Enable store card's flag | A boolean value to determine whether to enable the save store card option or not.If set to true , the payment form will display the option to save the store card.Defaulted to false if it is not set.If storeCardUniqueID is not empty , this value will be ignored. (My2C2PSDK v2.8.9 and above, renamed to enableStoreCard ) |
|
13 | userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
14 | userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
15 | userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
16 | userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
17 | userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
17 | useStoredCardOnly | boolean | N | Forced user to use the card passed by merchant with storedCardUniqueID . |
Defaulted to false if it is not set. false – Card holder may change card (default) true – Force card holder to use the passed token |
18 | subMerchantID | String | N | Sub merchant ID | - |
19 | 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+CKRFp720RoYmx9bCDRa6wL65g8SX8Rcl2lzO45hQzGYHGB0Q5Rytnf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kuz5TaaXOrPjZMaP8rfc3LNfbXil1GvH565QHTSDSG0G8WFUr/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.paymentUI = true; //set to true for UI payment
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "764";
sdk.storedCardUniqueID = "174";
sdk.request3DS = "Y";
//optionals
sdk.pan = "510510xxxxxx5100";
sdk.cardHolderName = "Mr. John";
sdk.cardHolderEmail = "john@email.com";
sdk.enableStoreCard = true;
sdk.userDefined1 = "ref1";
sdk.userDefined2 = "ref2";
sdk.userDefined3 = "ref3";
sdk.userDefined4 = "ref4";
sdk.userDefined5 = "ref5";
sdk.useStoredCardOnly = true;
//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 | cardHolderName | String | Y | Cardholder Name | - |
8 | cardHolderEmail | String | N | Cardholder Email | - |
9 | 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 ) |
|
10 | 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 ) |
|
11 | boolean | N | Enable store card's flag | A boolean value to determine whether to enable the save store card option or not.If set to true , the payment form will display the option to save the store card.Defaulted to false if it is not set.If storeCardUniqueID is not empty , this value will be ignored. (My2C2PSDK v2.8.9 and above, renamed to enableStoreCard ) |
|
12 | userDefined1 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
13 | userDefined2 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
14 | userDefined3 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
15 | userDefined4 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
16 | userDefined5 | String | N | Merchant Defined information. | 2c2p system will response back to merchant whatever information include in request message of this field |
17 | boolean | N | 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 ) |
|
18 | invoicePrefix | String | N | 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 ). |
20 | recurringAmount | double | N | 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 |
21 | recurringCount | int | N | Recurring total count allowed | Mandatory if recurring set to true . Repeat this payment x times. Value 0 for endless loop until terminated manually. |
22 | recurringInterval | int | N | Recurring interval in days. | Mandatory if recurring set to true . Charge card every x days. Max value 365 (1 year). |
23 | 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 ) |
|
24 | 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 |
25 | 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. |
26 | 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 |
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. |
29 | 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+kltTpILJ51sYbZV5gCbIVKzMyQmZef4rmVlbgCQe/CkBx7YCIVgO/GD47dedM53zKwlhjxv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hw8g9gchTBdOWLEh1/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.cardHolderName = "Mr. John";
sdk.paymentUI = true; //set to true for UI payment
//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.productionMode = true;
sdk.storeCard = true;
sdk.cardHolderEmail = "user@domain.com";
sdk.userDefined1 = "ref1";
sdk.userDefined2 = "ref2";
sdk.userDefined3 = "ref3";
sdk.userDefined4 = "ref4";
sdk.userDefined5 = "ref5";
sdk.chargeNextDate = "17102014"; //DDMMYYYY
sdk.chargeOnDate = "1710"; //DDMM
//proceed payment
sdk.proceed(MainActivity.this, REQUEST_SDK);
}
Payment Request With IPP
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | 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 ) |
|
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 | 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 ) |
|
8 | cardHolderName | String | N | Cardholder Name | - |
9 | cardHolderEmail | String | N | Cardholder Email | - |
10 | boolean | N | Enable store card's flag | A boolean value to determine whether to enable the save store card option or not.If set to true , the payment form will display the option to save the store card.Defaulted to false if it is not set.If storeCardUniqueID is not empty , this value will be ignored. (My2C2PSDK v2.8.9 and above, renamed to enableStoreCard ) |
|
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 | 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 |
17 | installmentPeriodFilter | String | N | IPP period filter value for the payment. | When IPP plan has registered for 2,3,4,5 months. if requested value with 3,4, only 3,4 months options will be shown on UI payment. Only accept format d,d,d...,d eg : 3 or 3,4. |
18 | storedCardUniqueID | String | N | Unique ID of store card info. |
- |
19 | 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 |
20 | productCode | String | N | Product Code for the payment. | - |
21 | subMerchantID | String | N | Sub merchant ID | - |
22 | 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+ewjzhtxJJS49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j6M2SEc8XPYj+TxJy/SCahFJ76+bYsHW0dKiFK3UKRctE1TGwBES5QtryInjELiEAyWxENnwBgEG9HfWqb7km6RKEX1gUeOPOcz5F8k+FFpWQe3+O2Tm89cPd6YCT7CoWRSjA5/K7rYFMZInL8xcXyShQcpLP7z0GSFeEpMZNNiRlB7s4aKJInFS89YSZETgOBPhIUyZVnrchNuoIfRXbpQWVXCMMnED0ccck5FHYMtAAAAAAAAAAAAAA==");
//set mandatory fields
sdk.paymentUI = true; //set to true for UI payment
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "764";
//mandatory only if pay with stored card else optional
sdk.storedCardUniqueID = "174";
//optionals - ipp
sdk.installmentPeriodFilter = "3,6";
sdk.promotion = "Happy1";
sdk.productCode = "ProductA";
//optionals
sdk.cardHolderName = "Mr. John";
sdk.cardHolderEmail = "john@email.com";
sdk.enableStoreCard = true;
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 Payment Option
Field Summary
No. | Field | Data Type | Mandatory | Description | Remarks |
---|---|---|---|---|---|
1 | 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 ) |
|
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 | 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 ) |
|
8 | cardHolderName | String | N | Cardholder Name | - |
9 | cardHolderEmail | String | N | Cardholder Email | - |
10 | boolean | N | Enable store card's flag | A boolean value to determine whether to enable the save store card option or not.If set to true , the payment form will display the option to save the store card.Defaulted to false if it is not set.If storeCardUniqueID is not empty , this value will be ignored. (My2C2PSDK v2.8.9 and above, renamed to enableStoreCard ) |
|
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 | 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 |
17 | paymentOption | PaymentOption | Y | payment Option | For Payments Options. Refer to Payment Option e.g ALL Note : Must target API version 9.1 and above. |
18 | subMerchantID | String | N | Sub merchant ID | - |
19 | 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/lQFe58wDQY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FW2lyzO16zIQ01XBtZHPnhkMoB3As0qSkWSgMv1D1EFjA2o50QZxCeBI1D1OU54bGwKSFVfIjzMVN8dmwEXDfl1IwZPMqcEkSYh2Ql5udXRaoQerzoUt+wxGkLsKIF5jz0JKJjXRpNdgeVG7LbTjj6M2SEc8XPYj+TxJy/SCahFJ76+bYsHW0dKiFK3UKRctE1TGwBES5QtryInjELiEAyWxENnwBgEG9HfWqb7km6RKEX1gUeOPOcz5F8k+FFpWQe3+O2Tm89cPd6YCT7CoWRSjA5/K7rYFMZInL8xcXyShQcpLP7z0GSFeEpMZNNiRlB7s4aKJInFS89YSZETgOBPhIUyZVnrchNuoIfRXbpQWVXCMMnED0ccck5FHYMtAAAAAAAAAAAAAA==");
//set mandatory fields
sdk.paymentUI = true; //set to true for UI payment
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "764";
sdk.paymentOption = PaymentOption.ALL; //Refer My2c2pSDK.PaymentOption class
//optionals
sdk.cardHolderName = "Mr. John";
sdk.cardHolderEmail = "john@email.com";
sdk.enableStoreCard = true;
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 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 | secretKey | String | Y | secret key | Provided by 2c2p system |
9 | 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 ) |
|
10 | boolean | Y | 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 ) |
|
11 | tokenizeWithoutAuthorization | boolean | Y | To only tokenize card without authorization | true - Perform tokenization. false - Perform normal authorization. |
12 | 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 |
13 | 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/Sv839jkybv47UN0B65jCABgkqhkiG9w0BBwEwHQYJYIZIAWUDBAECB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mandatory fields
sdk.paymentUI = true; //set to true for UI payment
sdk.merchantID = "JT01";
sdk.secretKey = "123456";
sdk.tokenizeWithoutAuthorization = true;
//optional
sdk.cardHolderEmail = "user@domain.com";
sdk.request3DS = "Y";
//proceed payment
sdk.proceed(MainActivity.this, REQUEST_SDK);
}