Closed ghani-ma closed 1 year ago
@ghani-ma for UIKit AndroidSDK has been updated to have qris gopay, but ios sdk unfortunately is not updated yet, will do it soon.
However, since you're using corekit, I think you can use gopay as qris. To create qris the payment type should be qris
, then you also need to set the acquirer
eg: gopay, shopeepay. So to create the MidtransPaymentDetails
, you can use something like this:
let qrisPaymentDetails = MidtransPaymentQRIS(acquirer: "gopay")
let qrisTransaction = MidtransTransaction(paymentDetails: qrisPaymentDetails, token: snapToken)
MidtransMerchantClient.shared().perform(qrisTransaction!) { result, error in
if let result = result {
}
}
If you want to use shopeepay qris, you can just change the acquirer value to shopeepay
.
Hi @uziwuzzy. Really appreciate your guidance. Thank you for the information regarding current iOS SDK that's not updated yet. We'll look forward to the updated iOS SDK.
Environment
SDK Installation : Swift Package Manager SPM Branch: Master MacOS Version: 13.0.1 (22A400) XCode Version: 14.1 (14B47b) iOS Version: iOS 16.1
Introduction: Hi, I'm developing an App that using Midtrans as its Payment Gateway. I'm using the
MidtransCoreKit
to handle each payment method that app will supports.The app has a flow where, if the user doesn't have Gojek / Shopee App installed, then the app need to continue the transaction using QRIS method. However, it seems the SDK doesn't have any QRISGopay or QRISShopeePay support.
As for my investigation into the SDK, I found that the SDK has
qrisshopeepay
(reference) payment-type key but noMidtransPaymentDetails
object using this key. (This is an example of ShopeePay PaymentDetails that usingshopeepay
key)What I have tried so far:
MidtransPaymentDetails
Protocolqrisshopeepay
exists, I set thepayment_type
's value toqrisshopeepay
let transaction = try MidtransTransaction(paymentDetails: MidtransPaymentShopeePayQRIS(), token: token)
Unfortunately, using above workaround and no matter of any payment-type variations value such as
qris_shopeepay
,qris_shopee_pay
orQRIS_shopeepay
the response still returns asInvalid payment type
like below:I can confirm if I change the
payment_type
toshopeepay
, which will be the same as MidtransPaymentShopeePay implementation it will behaving identical withMidtransPaymentShopeePay()
that will return below response:Moreover, when I looked into Midtrans Android SDK, there are already two of these and its works well when using it:
May I know how to implement
paymentUsingShopeePayQris
andpaymentUsingGoPayQris
using iOS SDK? Or, do I need to useMidtransPaymentQRIS(acquirer: "gopay" / "shopeepay")
to handle QRIS transaction? Or, does iOS SDK have not updated yet for GopayQRIS and ShopeePayQRIS implementation? Any further information or guidances would be helpful.Thank you!