Alternative Payment Request (Non-UI)
We are supporting over the counter and direct debit for alternative payment.
To make an alternative payment by payment channel, you will need to import the following classes into your Activity.
import com.ccpp.my2c2psdk.cores.My2c2pSDK;
import com.ccpp.my2c2psdk.cores.My2c2pSDK.PaymentChannel;
private static final int REQUEST_SDK = 1;
Next, need to set paymentChannel
to ONE_TWO_THREE
in My2c2pSDK object.
sdk.paymentChannel = PaymentChannel.ONE_TWO_THREE;
And also, it's required agentCode
and channelCode
.
For the agentCode and channelCode, you can get at 1-2-3 Agent & Channel Code Reference.
sdk.agentCode = "SCB";
sdk.channelCode = "ATM";
For eNETS , it require Singapore
agentCode
andchannelCode = WEBPAY
.
Next, you need to execute the library as demonstrated in the following function:
Full Sample Code
//initiate My2c2pSDK constructor with My2c2pKey
My2c2pSDK sdk = new My2c2pSDK("MIAGCSqGSIb3DQEHA6CAMIACAQAxggGoMIIBpAIBADCBizB+MQswCQYDVQQGEwJTRzELMAkGA1UECBMCU0cxEjAQBgNVBAcTCVNpbmdhcG9yZTENMAsGA1UEChMEMmMycDENMAsGA1UECxMEMmMycDEPMA0GA1UEAxMGbXkyYzJwMR8wHQYJKoZIhvcNAQkBFhBsdXNpYW5hQDJjMnAuY29tAgkA6a0e/lQFe58wDQYJKoZIhvcNAQEBBQAEggEAGMdlepae0qiHnF+dUehI49PdsH2Wr3aHoSjBvPFzKVcGNjYHEGOb8dJ40jpIIruiVUpkusI0M5zJU5icBBnSN/A3HCCyiaR/XlxqmyyjWns/Zk9VgVUVP+ewjzhtxJJS49OwQU1VhUc/IFk+gpUQpsEJhaShMJ6Mb09Ei04lDnv5xxMkt0MjmOgIp7Jfz7xCTUXwg3AZ1eUUEoTAtpzjoMqxhXnohxxTeam3ssJZdM0+pLwmmDiltNAYkn47o7Rww1w9Lu0j6gL2ikMtlkaZ7QRwV9ItbmAnCmXKXb0gjz3dvTzPbuvvertwunjMd2TDPc/Sv839jkybv47UN0B65jCABgkqhkiG9w0BBwEwHQYJYIZIAWUDBAECBBBhk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fields
sdk.merchantID = "JT01";
sdk.uniqueTransactionCode = "123456789";
sdk.desc = "product item 1";
sdk.amount = 20.00;
sdk.currencyCode = "840";
sdk.cardHolderName = "Mr. John";
sdk.cardHolderEmail = "user@domain.com";
sdk.secretKey = "123456";
//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 = "";
//proceed payment
sdk.proceed(MainActivity.this, REQUEST_SDK);
}
Check the full Payment Request example and response at My2c2pResponse.
Next :: Samsung Pay Request (Non-UI)