How to integrate

1. Generate secure pay token.

Merchants able to generate secure pay token for Do payment API. To do so, refer to the sample code below.

import com.ccpp.pgw.sdk.android.securepay.APIEnvironment;
import com.ccpp.pgw.sdk.android.securepay.Payload;
import com.ccpp.pgw.sdk.android.securepay.SecurePaySDK;
 
//Step 1 : Initialize SecurePay SDK
SecurePaySDK sdk = new SecurePaySDK(APIEnvironment.Sandbox);
 
//Step 2: Construct payload.
Payload payload = new Payload();
payload.setCardNo("4111111111111111");
payload.setExpiryMonth(12);
payload.setExpiryYear(2026);
payload.setIssuedMonth(6);
payload.setIssuedYear(2024);
payload.setSecurityCode("123");
payload.setPin("123456");

//Note: merchantId or paymentToken one of them is required.
payload.setMerchantId("JT01");
payload.setPaymentToken("kSAops9Zwhos8hSTSeLTUYSmc...he9wfQswTn/dR/njltP");
 
//Step 3: Genereate token.
String token = sdk.token(payload)
import com.ccpp.pgw.sdk.android.securepay.APIEnvironment
import com.ccpp.pgw.sdk.android.securepay.Payload
import com.ccpp.pgw.sdk.android.securepay.SecurePaySDK
  
//Step 1 : Initialize SecurePay SDK
val sdk = SecurePaySDK(APIEnvironment.Sandbox)
 
//Step 2: Construct payload.
val payload = Payload().apply {
     cardNo = "4111111111111111"
     expiryMonth = 12
     expiryYear = 2026
     issuedMonth = 6
     issuedYear = 2024
     securityCode = "123"
     pin = "123456"

     //Note: merchantId or paymentToken one of them is required.
     merchantId = "JT01"
     paymentToken = "kSAops9Zwhos8hSTSeLTUYSmc...he9wfQswTn/dR/njltP"
}
 
//Step 3: Genereate token.
val token = sdk.token(payload)
@import SecurePay;
 
//Step 1 : Initialize SecurePay SDK
SecurePaySDK *sdk = [[SecurePaySDK alloc] initWithApiEnvironment: SecurePayAPIEnvironmentSandbox];

//Step 2: Construct payload.
SecurePayPayload *payload = [[SecurePayPayload alloc] init];
payload.cardNo = @"4111111111111111";
payload.expiryMonth = 12;
payload.expiryYear = 2026;
payload.issuedMonth = 6;
payload.issuedYear = 2024;
payload.securityCode = @"123";
payload.pin = @"123456";

//Note: merchantId or paymentToken one of them is required.
payload.merchantId = @"JT01";
payload.paymentToken = @"kSAops9Zwhos8hSTSeLTUYSmc...he9wfQswTn/dR/njltP";

//Step 3: Genereate token.
NSString *token = [sdk token: payload];
import SecurePay
 
//Step 1 : Initialize SecurePay SDK
let sdk: SecurePaySDK = SecurePaySDK(apiEnvironment: SecurePayAPIEnvironment.Sandbox)
        
//Step 2: Construct payload.
let payload: SecurePayPayload = SecurePayPayload()
payload.cardNo = "4111111111111111"
payload.expiryMonth = 12
payload.expiryYear = 2026
payload.issuedMonth = 6
payload.issuedYear = 2024
payload.securityCode = "123"
payload.pin = "123456"

//Note: merchantId or paymentToken one of them is required.
payload.merchantId = "JT01"
payload.paymentToken = "kSAops9Zwhos8hSTSeLTUYSmc...he9wfQswTn/dR/njltP"

//Step 3: Genereate token.
let token: String = sdk.token(payload)

📘

Do Payment API

Refer to: Do Payment API