Cards via iPay88 leverages a third-party SDK that is currently only available for payments made in Malaysia with Malaysian Ringgit.
Before you begin
This guide assumes that you know how to:
Accept payments with Card via iPay88
Prepare the client session
Card via iPay88 requires the following data to process a payment successfully. Pass the following data in the client session, or in the payment request (for manual payment creation).
| Parameter Name | Required | Description |
|---|
currencyCode | ✔ | 3-letter currency code in ISO 4217 format, e.g. USD for US dollars |
order ↳ lineItems | ✔ | Details of the line items of the order |
order ↳ lineItems | ✔ | Description of the line item |
order ↳ countryCode | ✔ | Must by MY |
customer ↳ firstName | ✔ | First name of the customer |
customer ↳ lastName | ✔ | Last name of the customer |
customer ↳ emailAddress | ✔ | Customer email address |
Prepare the SDK for payments
Pre-requisites
iPay88 requires the installation of a separate library via Cocoapods.Add the line below in your Podfiletarget 'App' do
//...
pod 'PrimerSDK'
// Add the line below to enable iPay88
pod 'PrimerIPay88MYSDK'
end
If you face the error with id missing-sdk and description Missing SDK PrimerIPay88MYSDK add the following post-install script in your podfile:target 'App' do
# ...
post_install do |installer|
fix_linking(installer)
end
end
def fix_linking(installer)
installer.generated_projects.each do |project|
project.targets.each do |target|
if target.name == "PrimerSDK"
target.build_configurations.each do |config|
config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -framework "PrimerIPay88MYSDK"'
end
end
end
end
end
Handle payment method
Cards via iPay88 requires a Native UI Manager in order to be presented to the user:// 👇 Create the payment method manager
let nativeUIPaymentMethodManager = try PrimerHeadlessUniversalCheckout.NativeUIManager(paymentMethodType: "IPAY88_CARD")
// 👇 Show the payment method
try nativeUIPaymentMethodManager.showPaymentMethod(intent: .checkout)
Limitations
- Due to a limitation from iPay88, the library cannot be installed with Swift Package Manager
Vaulting
Cards via iPay88 can only be vaulted after a successful payment.Make sure to set paymentMethod.vaultOnSuccess to true in the client session. This ensures that the card is added to Primer’s centralized vault after a payment is successfully authorized.In order to vault Card via iPay88 accounts, pass the following data in the Client Session:| Parameter Name | Required | Description |
|---|
| customerId | ✔ | A unique identifier for your customer |
Prepare the SDK for vaulting
Follow the instructions written above to install the iPay88 SDK and present Cards via iPay88 to the user.If vaultOnSuccess is properly set to true in the client session, the card will automatically be vaulted against the customer id.
Follow the instructions written above to install the iPay88 SDK and present Cards via iPay88 to the user.If vaultOnSuccess is properly set to true in the client session, the card will automatically be vaulted against the customer id.
Pre-requisites
iPay88 requires the installation of a separate library.
ℹ️ Starting from version 1.0.3 onward, we are transitioning our SDK artifact distribution to Maven Central. This means you no longer need to reference the private Artifactory URL (PRIMER_ANDROID_ARTIFACTORY_URL) for future updates.Please ensure that you remove any references to the Artifactory URL previously used for our SDK.
Amend the dependencies section of your app’s build.gradle to include the ipay88-my-android library:dependencies {
/* Other dependencies... */
implementation "io.primer:ipay88-my-android:1.0.3"
}
Handle payment method
Cards via iPay88 requires a Native UI Manager in order to be presented to the user:
// 👇 Create the payment method manager
val nativeUiManager = PrimerHeadlessUniversalCheckoutNativeUiManager.newInstance("IPAY88_CARD")
// 👇 Show the payment method
nativeUiManager.showPaymentMethod(this, PrimerSessionIntent.CHECKOUT)
Vaulting
Cards via iPay88 can only be vaulted after a successful payment.Make sure to set paymentMethod.vaultOnSuccess to true in the client session. This ensures that the card is added to Primer’s centralized vault after a payment is successfully authorized.In order to vault Card via iPay88 accounts, pass the following data in the Client Session:| Parameter Name | Required | Description |
|---|
| customerId | ✔ | A unique identifier for your customer |
Go live
You don’t need to do anything particular to go live — just make sure to use production credentials.