Alternative Payment Request (Non-UI)
We are supporting over the counter and direct debit for alternative payment.
To make the payment the alternative payment , need to set paymentChannel
is PaymentChannelOneTwoThree
in my2c2pSDK object.
paymentSDK.paymentChannel = PaymentChannelOneTwoThree;
paymentSDK.paymentChannel = PaymentChannel.oneTwoThree.rawValue as NSString
For alternative payment, it required agentCode
and channelCode
.
For the agentCode and channelCode, you can get at 1-2-3 Agent & Channel Code Reference.
paymentSDK.agentCode = @"KTB";
paymentSDK.channelCode = @"BANKCOUNTER";
paymentSDK.agentCode = "KTB" //require
paymentSDK.channelCode = "BANKCOUNTER"
For eNETS , it require Singapore
agentCode
andchannelCode = WEBPAY
.
Full Sample Code
- (void)payment {
//set mandatory fields
paymentSDK.merchantID = @"JT01";
paymentSDK.uniqueTransactionCode = @"123456789";
paymentSDK.desc = @"production item 1";
paymentSDK.amount = 10.00;
paymentSDK.currencyCode = @"764";
paymentSDK.cardHolderName = @"Mr. John";
paymentSDK.cardHolderEmail = @"john@email.com";
paymentSDK.secretKey = @"123456";
paymentSDK.paymentUI = NO;
//set 123 mandatory fields
paymentSDK.paymentChannel = PaymentChannelOneTwoThree;
paymentSDK.agentCode = @"SCB";
paymentSDK.channelCode = @"ATM";
//set 123 optionals fields
paymentSDK.paymentExpiry = @"";
paymentSDK.mobileNo = @"";
[paymentSDK requestWithTarget:self onResponse:^(NSDictionary *response) {
if([response[@"status"] isEqualToString:@"001"]) {
NSLog(@"success");
}
NSLog(@"%@",response);
} onFail:^(NSError *error) {
NSLog(@"%@",error);
}];
}
func payment() {
//set mandatory fields
paymentSDK.merchantID = "JT01"
paymentSDK.uniqueTransactionCode = "123456789"
paymentSDK.desc = "production item 1"
paymentSDK.amount = 10.00
paymentSDK.currencyCode = "764"
paymentSDK.cardHolderName = "Mr. John"
paymentSDK.cardHolderEmail = "john@email.com"
paymentSDK.secretKey = "123456"
paymentSDK.paymentUI = false
//set 123 mandatory fields
paymentSDK.paymentChannel = PaymentChannel.oneTwoThree.rawValue as NSString
paymentSDK.agentCode = "SCB"
paymentSDK.channelCode = "ATM"
//set 123 optionals fields
paymentSDK.paymentExpiry = ""
paymentSDK.mobileNo = ""
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 information at Payment Request and response at Response Dictionary.
Next :: Kanbawza Bank On Us (KBZ Bank) Payment Request (Non-UI)