Create the CheckoutSettings with BLIK payment brand.
Make use of isShowOtpEnabled flag that enable/disable OTP field to be presented on the payment details for blik. By default, its value is set to true.
// Set Blik payment method
checkoutSettings.paymentBrands = @"BLIK";
//Set the flag showOtpEnabled
checkoutSettings.showOtpEnabled = YES;
// Set Blik payment method
checkoutSettings.paymentBrands = "BLIK";
//Set the flag showOtpEnabled
checkoutSettings.showOtpEnabled = true;
Create the CheckoutSettings with BLIK payment brand.
Make use of isShowOtpEnabled flag that enable/disable OTP field to be presented on the payment details for Blik. By default, its value is set to true.
Set<String> paymentBrands = new HashSet<>();
paymentBrands.add("BLIK");
CheckoutSettings checkoutSettings = new CheckoutSettings(
checkoutId,
paymentBrands,
providerMode
);
// set the flag showOtpEnabled
checkoutSettings.setOtpEnable(true);
val paymentBrands = hashSetOf("BLIK")
val checkoutSettings = CheckoutSettings(
checkoutId,
paymentBrands,
providerMode
)
// set the flag showOtpEnabled
checkoutSettings.otpEnable = true
SDK & Your Own UI
If you use our mSDK just for backend communication, you will have to go through the Blik integration as well. In this guide we assume you already implemented all steps for performing standard mSDK transaction.
1. Send transaction with blik payment parameters
First of all, create OPPBlikPaymentParams object and submit a transaction and Server will return:
redirect url to redirect transaction to the Blik.
OPPBlikPaymentParams *params = [OPPBlikPaymentParams blikPaymentParamsWithCheckoutID:CheckoutID
otp:OTP
error:&error];
// Set shopper result URL
paymentParams.shopperResultURL = @"com.companyname.appname.payments://result";
if (error) {
// See error.code (OPPErrorCode) and error.localizedDescription to identify the reason of failure.
} else {
OPPTransaction *transaction = [OPPTransaction transactionWithPaymentParams:paymentParams];
[self.provider submitTransaction:transaction completionHandler:^(OPPTransaction * _Nonnull transaction, NSError * _Nullable error) {
if (error) {
// Handle the error.
} else {
// Use the following params to complete Blik transaction.
NSString *redirectUrl = transaction.redirectURL;
}
}];
}
do {
let paymentParams = try OPPBlikPaymentParams(checkoutID: checkoutID, otp:OTP, error: error)
// Set shopper result URL
paymentParams.shopperResultURL = "com.companyname.appname.payments://result"
let transaction = OPPTransaction(paymentParams: paymentParams)
provider.submitTransaction(transaction) { (transaction, error) in
if (error != nil) {
// Handle the error.
} else {
// Use the following params to complete Blik transaction.
let redirectUrl = transaction.redirectURL;
}
}
} catch let error as NSError {
// See error.code (OPPErrorCode) and error.localizedDescription to identify the reason of failure.
}
PaymentParams paymentParams;
// use the following param to complete the transaction via Blik
paymentParams = new BlikPaymentParams(checkoutId, blikCode);
// set shopper result URL
paymentParams.setShopperResultUrl("companyname://result");
Transaction transaction = new Transaction(paymentParams);
paymentProvider.submitTransaction(transaction);
// redirect shopper to the redirectUrl
String redirectUrl = transaction.getRedirectUrl();
// use the following param to complete the transaction via Blik
val paymentParams = BlikPaymentParams(checkoutId, blikCode)
// set shopper result URL
paymentParams.shopperResultUrl = "companyname://result"
val transaction = Transaction(paymentParams)
paymentProvider.submitTransaction(transaction)
// redirect shopper to the redirectUrl
val redirectUrl = transaction.getRedirectUrl