How to integrate

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 : Init sdk
SecurePaySDK sdk = new SecurePaySDK(APIEnvironment.Sandbox);
 
//Step 2: Construct payload.
Payload payload = new Payload();
payload.setCardNo("4111111111111111");
payload.setExpiryMonth(12);
payload.setExpiryYear(2024);
payload.setIssuedMonth(5);
payload.setIssuedYear(2022);
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 SecurePay;
 
//Step 1 : Init sdk
SecurePaySDK *sdk = [[SecurePaySDK alloc] initWithApiEnvironment: SecurePayAPIEnvironmentSandbox];

//Step 2: Construct payload.
SecurePayPayload *payload = [[SecurePayPayload alloc] init];
payload.cardNo = @"4111111111111111";
payload.expiryMonth = 12;
payload.expiryYear = 2024;
payload.issuedMonth = 5;
payload.issuedYear = 2022;
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 : Init sdk
let sdk: SecurePaySDK = SecurePaySDK(apiEnvironment: SecurePayAPIEnvironment.Sandbox)
        
//Step 2: Construct payload.
let payload: SecurePayPayload = SecurePayPayload()
payload.cardNo = "4111111111111111"
payload.expiryMonth = 12
payload.expiryYear = 2024
payload.issuedMonth = 5
payload.issuedYear = 2022
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)