Payment Option Request (UI)
We are supporting following payment option:
PaymentOptionAll
PaymentOptionFull
PaymentOptionInstallment
PaymentOptionCreditCard
PaymentOptionCreditCardInstallment
PaymentOptionOneTwoThree
PaymentOptionMPU
PaymentOptionUPOP
PaymentOptionAlipay
PaymentOptionGCash
PaymentOptionKCP
PaymentOptionKBZ
PaymentOptionWavePay
PaymentOptionLoanCard
PaymentOptionBank
PaymentOptionOverTheCounter
PaymentOptionKiosk
PaymentOptionMasterPass
PaymentOptionTouchNGo
PaymentOptionGrabPay
PaymentOptionBoost
PaymentOptionTrueMoney
PaymentOptionOKDollar
- (void)payment {
//set mandatory fields
paymentSDK.merchantID = @"JT01";
paymentSDK.uniqueTransactionCode = @"123456789";
paymentSDK.desc = @"product item 1";
paymentSDK.amount = 20.00;
paymentSDK.currencyCode = @"840";
paymentSDK.secretKey = @"123456";
paymentSDK.paymentOption = PaymentOptionAll;
paymentSDK.paymentUI = YES;
[paymentSDK requestWithTarget:self onResponse:^(NSDictionary *response)
{
NSLog(@"%@",response);
if([response[@"respCode"] isEqualToString:@"00"])
{
message = @"Payment Success";
}
else {
message = response[@"failReason"];
}
NSLog(@"Payment status: %@",message);
} onFail:^(NSError *error) {
if(error) {
NSLog(@"%@",error);
}
else {
NSLog(@"Cancel The Payment From OTP");
}
}];
}
func payment() {
//set mandatory fields
paymentSDK.merchantID = "JT01"
paymentSDK.uniqueTransactionCode = "123456789"
paymentSDK.desc = "product item 1"
paymentSDK.amount = 20.00
paymentSDK.currencyCode = "840"
paymentSDK.secretKey = "123456"
paymentSDK.paymentOption = PaymentOption.all.rawValue as NSString
paymentSDK.paymentUI = true
paymentSDK.request(withTarget: self, onResponse: { (response) in
print("response: \(String(describing: response))")
}) { (error) in
if error != nil {
print("error: \(String(describing: error?.localizedDescription))")
}else{
print("user cancel payment")
}
}
}
Check the full Payment Request example and response at Response Dictionary.