- Get Started
- Guides
- Integrations
- References
- API Reference
- Basic Payment
- Forex
- Authentication
- Card Account
- Apple Pay
- Virtual Account
- Bank Account
- Token Account
- Customer
- Billing Address
- Merchant Billing Address
- Shipping Address
- Merchant Shipping Address
- Merchant
- Corporate
- Recipient
- Marketplace & Cart
- Airline
- Lodging
- Passenger
- Tokenization
- Recurring Migration
- 3D Secure
- Custom Parameters
- Async Payments
- Webhook notifications
- Job
- Risk
- Response Parameters
- Card On File
- Chargeback
- Result Codes
- Payment Methods
- Transaction Flows
- Regression Testing
- Data Retention Policy
- API Reference
- Support
Migration guide
Quick links:
Migrating to 6.x.x
Minimal supported iOS version has been changed to iOS 12.
API Deprecations
Deprecated in 5.x.x | Use instead in 6.x.x | |
---|---|---|
OPPCheckoutInfo | ||
@property (nonatomic, copy) NSArray |
Not used anymore. | |
@property (nonatomic, assign) OPPThreeDS2Flow threeDS2Flow |
Not used anymore. | |
@property (nonatomic, getter=isBrowserParamsRequired) BOOL browserParamsRequired |
Not used anymore. |
Increased the minimal required API level
In order to support the new features and payment methods the minimal API level required for Mobile SDK has been changed to 24.
Please make sure your application uses minSdkVersion 24 or above.
Handling asynchronous payments with Ready-to-Use UI
To simplify the Ready-to-Use UI integration the CheckoutActivity
will handle the redirect to the shopper result URL. For this reason the shopper result URL has been removed from the CheckoutSettings
. As a result setting the intent filter for the shopper result URL and handling the redirect in onNewIntent callback are not required anymore.
API Deprecations
Deprecated in 5.x.x | Use instead in 6.x.x | |
---|---|---|
CheckoutThreeDS2Flow | Not used anymore. | |
CheckoutInfo | ||
String[] getThreeDS2Brands() |
Not used anymore. | |
CheckoutThreeDS2Flow getThreeDS2Flow() |
Not used anymore. | |
boolean isBrowserParamsRequired() |
Not used anymore. |
Migrating to 5.x.x
Simplified 3D Secure 2.x integration
Since Mobile SDK 5.0.0 the external initialization of 3DS service was removed. Now it is fully managed by Mobile SDK. Please check 3D Secure 2 page for more details. Check your integration for OPPThreeDSService
leftovers and remove if any.
Use the threeDSConfig
property of the OPPCheckoutSettings
instance to assign OPPThreeDSConfig
.
OPPThreeDSConfig *config = [[OPPThreeDSConfig alloc] init];
checkoutSettings.threeDSConfig = config;
let config = OPPThreeDSConfig()
checkoutSettings.threeDSConfig = config
Core API Deprecations
Deprecated in 4.x.x | Use instead in 5.x.x | |
---|---|---|
OPPPaymentProvider | ||
+paymentProviderWithMode:andDomain: |
Not used anymore. |
|
@property OPPProviderDomain domain |
Not used anymore. |
|
-requestPaymentBrandsForBin:checkoutID:completionHandler: |
-requestBinInfoWithCheckoutID:bin:completionHandler: |
Required dependencies
Because Mobile SDK distributed as .aar file it doesn't include transitive dependencies.
Your application build.gradle
must define them.
implementation "androidx.appcompat:appcompat:1.4.2"
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.browser:browser:1.4.0"
implementation "androidx.fragment:fragment-ktx:1.4.1"
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation "androidx.webkit:webkit:1.6.0"
implementation "com.google.android.material:material:1.6.1"
implementation "com.google.code.gson:gson:2.8.9"
Make sure viewBinding feature is enabled.
buildFeatures {
viewBinding true
}
Simplified 3D Secure 2.x integration
Since Mobile SDK 5.0.0 the external initialization of 3DS service was removed. Now it is fully managed by Mobile SDK. Please check 3D Secure 2 page for more details.
Using Activity Result API
The Mobile SDK started to use Activity Result API for Ready-to-Use UI. The method to create the intent was removed from CheckoutSettings
, use CheckoutActivityResultContract
instead. Please check Present Checkout UI for more details.
API Deprecations
Deprecated in 4.x.x | Use instead in 5.x.x | |
---|---|---|
CheckoutSettings | ||
Intent createCheckoutActivityIntent(Context context) |
CheckoutActivityResultContract |
|
CheckoutSettings setProviderDomain(Connect.ProviderDomain providerDomain) |
Not used anymore. | |
Intent createCheckoutActivityIntent(Context context, ComponentName componentName) |
CheckoutActivityResultContract |
|
PaymentButtonFragment | ||
void submitTransaction(CheckoutSettings checkoutSettings, ComponentName componentName) |
Set componentName in the CheckoutSettings before submitting transaction. |
|
CardPaymentParams | ||
boolean isNumberValid(String cardNumber) |
boolean isNumberValid(String cardNumber, boolean luhnCheck) |
|
boolean checkLuhn(String cardNumber) |
boolean isNumberValid(String cardNumber, boolean luhnCheck) |
|
OppPaymentProvider | ||
OppPaymentProvider(Context context, Connect.ProviderMode providerMode, Connect.ProviderDomain providerDomain) |
Not used anymore. | |
void requestPaymentBrandsForBin(String bin, String checkoutId, ITransactionListener listener) |
void requestBinInfo(String checkoutId, String bin, BinInfoListener listener |
|
void sendThreeDS2AuthParams(String authParams, Transaction transaction, ThreeDS2AuthResponseListener listener) |
The authentication parameters will be sent automatically. |
Naming changes
com.oppwa.mobile.connect.threeds.OppThreeDSConfig
->com.oppwa.mobile.connect.provider.threeds.v2.model.ThreeDSConfig
com.oppwa.mobile.connect.threeds.constant.ChallengeUiType
->com.oppwa.mobile.connect.provider.threeds.v2.model.ChallengeUiType
Migrating to 4.x.x
One framework instead of two
Mobile 3DS SDK wrapper OPPWAMobile_ThreeDS.xcframework is deprecated now - all 3DS functionality is build into Mobile SDK OPPWAMobile.xcframework. So before moving forward:
- Remove
OPPWAMobile_ThreeDS.xcframework
from your project. - Review your project settings - General and Build Phases tabs for ThreeDS wrapper leftovers.
Import mandatory library
As 3DS SDK now is a part of Mobile SDK you have to import the following framework to the project:
ipworks3ds_sdk.xcframework // certified 3DS SDK
There are two versions of the ipworks3ds_sdk.xcframework
included: one to be used for development and one for production. The production version includes more strict security measures that would not allow for common development processes to occur, including running with attached debuggers or using simulators/emulators. The deployment version includes _deploy
in the filename.
- Drap and drop
ipworks3ds_sdk.xcframework
to the "Frameworks" folder of your project.
Make sure "Copy items if needed" is checked. - Embed the frameworks
- Go to the app target’s General configuration page.
- Add the frameworks target to the Frameworks, Libraries, and Embedded Content section by clicking the Add icon.
- Review your Build Phases:
ipworks3ds_sdk.xcframework
is added to the "Link Binary With Libraries".
One framework instead of two
Mobile 3DS SDK wrapper oppwa.mobile.threeds.aar is deprecated now - all 3DS functionality is build into Mobile SDK oppwa.mobile.aar. So before moving forward remove oppwa.mobile.threeds.aar from your project.
Import mandatory library
As 3DS SDK now is a part of Mobile SDK you have to import the following framework to the project:
ipworks3ds_sdk.aar // certified 3DS SDK
Drag and drop ipworks3ds_sdk.aar (use ipworks3ds_sdk_deploy.aar for production) to the "libs" folder of the module where you plan to integrate Mobile SDK.
There are two versions of the ipworks3ds_sdk
included: one to be used for development and one for production. The production version includes more strict security measures that would not allow for common development processes to occur, including running with attached debuggers or using simulators/emulators. The deployment version includes _deploy
in the filename.
Easy Custom UI 3D Secure 2.x integration
The highlight of Mobile SDK 4.x is an easy Your Own UI 3D Secure 2.x integration. You don't need to send authentication parameters, display processing view and handle authentication response anymore - all these steps integrated into Submit Transaction call. Check MSDK + Your Custom UI page for more details.
Checkout API Deprecations
Deprecated in 3.x.x | Use instead in 4.x.x | |
---|---|---|
OPPCheckoutSettings | ||
@property BOOL showDetectedBrands |
@property OPPCheckoutBrandDetectionAppearanceStyle brandDetectionAppearanceStyle |
Deprecated in 3.x.x | Use instead in 4.x.x | |
---|---|---|
CheckoutSettings | ||
boolean isDetectedBrandsShown() |
CheckoutBrandDetectionAppearanceStyle getBrandDetectionAppearanceStyle() |
|
CheckoutSettings setShowDetectedBrands(boolean isDetectedBrandsShown) |
CheckoutSettings setBrandDetectionAppearanceStyle(CheckoutBrandDetectionAppearanceStyle brandDetectionAppearanceStyle) |
|
PaymentDataRequest getGooglePayPaymentDataRequest() |
String getGooglePayPaymentDataRequestJson() |
|
CheckoutSettings setGooglePayPaymentDataRequest(PaymentDataRequest paymentDataRequest) |
CheckoutSettings setGooglePayPaymentDataRequestJson(String googlePayPaymentDataRequestJson) |
Core API Deprecations
Deprecated in 3.x.x | Use instead in 4.x.x | |
---|---|---|
OPPTransaction | ||
@property NSString *alipaySignedOrderInfo |
@property NSDictionary |
|
OPPThreeDSService | ||
public func createTransaction(paymentBrand:) |
public func createTransaction(paymentBrand:protocolVersion:) |
|
OPPThreeDSSchemeConfig | ||
public var protocolVersion |
Set protocol version during creation of the transaction OPPThreeDSService.createTransaction(paymentBrand:protocolVersion:) |
Deprecated in 3.x.x | Use instead in 4.x.x | |
---|---|---|
ConnectService | Not used anymore. Use OppPaymentProvider directly. | |
IProviderBinder | Not used anymore. | |
PaymentProviderNotInitializedException | Not used anymore. | |
Transaction | ||
String BANCONTACT_SECURE_TRANSACTION_ID_KEY |
String BANCONTACT_LINK_APP_SCHEME_URL_KEY |
|
GooglePayPaymentParams | ||
GooglePayPaymentParams(String checkoutId, String paymentToken) |
GooglePayPaymentParams(String checkoutId, String paymentToken, String cardBrand) |
|
OppThreeDSService | ||
OppThreeDSTransaction createTransaction(String paymentBrand) |
OppThreeDSTransaction createTransaction(String paymentBrand, String protocolVersion) |
|
SchemeConfig | ||
String DEFAULT_PROTOCOL_VERSION |
Not used anymore. | |
void setProtocolVersion(String protocolVersion) |
The protocol version should be passed to the createTransaction(String paymentBrand, String protocolVersion) method of the OppThreeDSService instead. | |
String getProtocolVersion() |
Not used anymore. |
Migrating to 3.x.x
New Gradle dependencies
Mobile SDK is migrated from Support Libraries to AndroidX Libraries, which means the following changes for you:
- If your project still uses Support Libraries, you will have to migrate it to AndroidX, otherwise project won't be compiled with the mSDK.
- Replace Support Library dependencies:
Old dependency | New dependency |
---|---|
implementation "com.android.support:support-v4:28.0.0" | |
implementation "com.android.support:appcompat-v7:28.0.0" | implementation "androidx.appcompat:appcompat:x.x.x" |
implementation "com.android.support:design:28.0.0" | implementation "androidx.browser:browser:x.x.x" |
implementation "com.android.support:customtabs:28.0.0" | implementation "com.google.android.material:material:x.x.x" |
API Changes
PaymentButtonFragment
It will only affect you if you use Payment Button type of integration.
We removed PaymentButtonSupportFragment
and upgraded PaymentButtonFragment
to extend AndroidX Fragment
class.
Make sure you now use PaymentButtonFragment
and AndroidX FragmentManager
.
New format of framework
Mobile SDK is migrated from Universal (FAT) Framework to Apple's new framework format XCFrameworks, which means the following changes for you:
- Remove
OPPWAMobile.framework
&OPPWAMobile-Resources.bundle
from your project. - Drag and drop
OPPWAMobile.xcframework
to the "Frameworks" folder of your project.
Make sure "Copy items if needed" is checked.
- Check "Frameworks, Libraries, and Embedded Content" section under the general settings tab of your application's target. Ensure the Embed dropdown has Embed and Sign selected for the framework.
NOTE: Run script for removing unused architectures from the
OPPWAMobile.framework
is not needed anymore.Customization of localized strings
The way you can customize localized strings in Ready-to-use UI is slightly changed. So if you're using this feature, you have to adapt your project for the new version of mSDK.
Previously you could change and add customized strings right in the OPPWAMobile-Resources.bundle
.
Now you should do the same changes but on the level of your application.
In short, you should create OPPCheckout.string
file in your project and localize it. Here you will be able to override and add any label of Ready-to-use UI for any language.
String keys remains the same, you just need to move customized strings from the mSDK bundle to your app. See the full guide for details.
Checkout API Deprecations
Deprecated code is removed. If you have any issues with compiling the project, check the tables below.
Deprecated in 2.x.x | Use instead in 3.x.x | |
---|---|---|
OPPCheckoutProvider | ||
-presentCheckoutForSubmittingTransactionCompletion Handler:paymentBrandSelectedHandler:cancelHandler: |
-presentCheckoutForSubmittingTransactionCompletion Handler:cancelHandler: |
|
-presentCheckoutForSubmittingTransactionCompletion Handler:paymentMethodSelectedHandler:cancelHandler: |
-presentCheckoutWithPaymentBrand:loadingHandler: completionHandler:cancelHandler: |
|
-presentCheckoutWithPaymentMethod:loadingHandler: completionHandler:cancelHandler: |
-presentCheckoutWithPaymentBrand:loadingHandler: completionHandler:cancelHandler: |
|
OPPCheckoutSettings | ||
@property NSArray<NSNumber *> *paymentMethods |
@property NSArray<NSString *> *paymentBrands |
|
@property NSString *schemeURL |
@property NSString *shopperResultUrl |
|
@property NSString *paymentTitle |
Not used anymore. | |
OPPCheckoutTheme | ||
@property UIColor *paymentMethodIconBackgroundColor |
Not used anymore. | |
@property UIColor *textFieldBackroundColor |
Not used anymore. | |
@property UIColor *secondaryBackgroundColor |
Not used anymore. | |
@property UIColor *secondaryForegroundColor |
Not used anymore. | |
OPPCheckoutPaymentMethod | Not used anymore. Use strings for payment brands instead, e.g. "VISA". | |
OPPPaymentButton | ||
@property OPPCheckoutPaymentMethod paymentMethod |
@property NSString *paymentBrand |
|
+paymentButtonWithPaymentMethod: |
+paymentButtonWithPaymentBrand: |
|
-initWithPaymentMethod: |
-initWithPaymentBrand: |
|
OPPSecurityPolicy | ||
@property NSArray<NSNumber *> *paymentMethods |
@property NSArray<NSString *> *paymentBrands |
|
+securityPolicyWithPaymentMethods:mode: |
+securityPolicyWithPaymentBrands:mode: |
|
Localization keys | ||
FIELD_ERROR_CARD_MOBILE_PHONE_INVALID |
FIELD_ERROR_MOBILE_PHONE_INVALID |
|
PAYMENT_METHOD_TYPE_APPLE_PAY |
PAYMENT_METHOD_TYPE_APPLEPAY |
|
PAYMENT_METHOD_TYPE_CHINA_UNIONPAY |
PAYMENT_METHOD_TYPE_CHINAUNIONPAY |
|
PAYMENT_METHOD_TYPE_DINERS_CLUB |
PAYMENT_METHOD_TYPE_DINERS |
|
PAYMENT_METHOD_TYPE_MASTERCARD |
PAYMENT_METHOD_TYPE_MASTER |
|
PAYMENT_METHOD_TYPE_SEPA_DIRECT_DEBIT |
PAYMENT_METHOD_TYPE_DIRECTDEBIT_SEPA |
|
PAYMENT_METHOD_TYPE_SOFORT_BANKING |
PAYMENT_METHOD_TYPE_SOFORTUEBERWEISUNG |
Deprecated in 2.x.x | Use instead in 3.x.x | |
---|---|---|
CheckoutActivity | ||
CHECKOUT_ACTIVITY |
|
|
ACTION_PAYMENT_METHOD_SELECTED |
|
|
CheckoutConstants | ||
PAY_WITH_GOOGLE |
GOOGLEPAY |
|
CheckoutSettings | ||
CheckoutSettings(String, Set |
CheckoutSettings(String, Set, Connect.ProviderMode) |
|
CheckoutSettings(String, String, CheckoutPaymentMethod[]) |
CheckoutSettings(String, Set, Connect.ProviderMode) |
|
getPaymentMethods() |
getPaymentBrands() |
|
setPaymentMethods(CheckoutPaymentMethod[]) |
setPaymentBrands(Set) |
|
getPaymentTitle() |
Not used anymore. | |
setPaymentTitle(String) |
Not used anymore. | |
isWebViewEnabledFor3DSecure() |
Not used anymore. | |
setWebViewEnabledFor3DSecure(boolean) |
Not used anymore. | |
isPhoneStatePermissionRequestRequired() |
Not used anymore. | |
setPhoneStatePermissionRequestRequired(boolean) |
Not used anymore. | |
getGooglePayAllowedCardNetworks() |
getGooglePayPaymentDataRequest() |
|
getGooglePayAllowedPaymentMethods() |
getGooglePayPaymentDataRequest() |
|
getPayWithGoogleAllowedCardNetworks() |
getGooglePayPaymentDataRequest() |
|
getPayWithGoogleAllowedPaymentMethods() |
getGooglePayPaymentDataRequest() |
|
getEntityId() |
getGooglePayPaymentDataRequest() |
|
setGooglePayAllowedCardNetworks(Integer[]) |
setGooglePayPaymentDataRequest(PaymentDataRequest) |
|
setGooglePayAllowedPaymentMethods(Integer[]) |
setGooglePayPaymentDataRequest(PaymentDataRequest) |
|
setPayWithGoogleAllowedCardNetworks(Integer[]) |
setGooglePayPaymentDataRequest(PaymentDataRequest) |
|
setPayWithGoogleAllowedPaymentMethods(Integer[]) |
setGooglePayPaymentDataRequest(PaymentDataRequest) |
|
setEntityId(String) |
setGooglePayPaymentDataRequest(PaymentDataRequest) |
|
CheckoutPaymentMethod | Not used anymore. Use strings for payment brands instead, e.g. "VISA". | |
PaymentButtonSupportFragment | Renamed to PaymentButtonFragment .
| |
PaymentButtonFragment | Now extends androidx.fragment.app.Fragment | |
getPaymentMethod() |
getPaymentBrand() |
|
setPaymentMethod(CheckoutPaymentMethod) |
setPaymentBrand(String) |
|
isReadyForPayWithGoogle(Context, Connect.ProviderMode, Integer[], OnCompleteListener |
isReadyForGooglePay(Context, Connect.ProviderMode, Integer[], OnCompleteListener) |
|
IPaymentFormListener | ||
onCardHolderValidate(String) |
Callback became optional. | |
ITransactionListener | ||
brandsValidationRequestSucceeded(BrandsValidation) |
Callback became optional. | |
brandsValidationRequestFailed(PaymentError) |
Callback became optional. | |
imagesRequestSucceeded (ImagesRequest) |
Callback became optional. | |
imagesRequestFailed() |
Callback became optional. | |
paymentConfigRequestSucceeded(CheckoutInfo) |
Callback became optional. | |
paymentConfigRequestFailed(PaymentError) |
Callback became optional. |
Core API Deprecations
Deprecated in 2.x.x | Use instead in 3.x.x | |
---|---|---|
OPPPaymentParamsBrand | Not used anymore. | |
OPPPaymentParams | ||
@property OPPPaymentParamsBrand brand |
@property NSString *paymentBrand |
|
-addCustomParamWithName:value: |
-addParamWithName:value: |
|
-removeCustomParamWithName: |
-removeParamWithName: |
|
OPPCardPaymentParams | ||
+cardPaymentParamsWithCheckoutID:brand:holder: number:expiryMonth:expiryYear:CVV:error: |
+cardPaymentParamsWithCheckoutID:paymentBrand:holder: number:expiryMonth:expiryYear:CVV:error: |
|
-initWithCheckoutID:brand:holder:number: expiryMonth:expiryYear:CVV:error: |
-initWithCheckoutID:paymentBrand:holder:number: expiryMonth:expiryYear:CVV:error: |
|
+isCvvValid:forBrand: |
+isCvvValid: |
|
+isCvvValid:forPaymentBrand: |
+isCvvValid: |
|
+isNumberValid:forPaymentBrand: |
+isNumberValid:luhnCheck: |
|
+isNumberValid:forBrand: |
+isNumberValid:luhnCheck: |
|
OPPTokenPaymentParams | ||
+tokenPaymentParamsWithCheckoutID:tokenID:brand: error: |
+tokenPaymentParamsWithCheckoutID:tokenID:paymentBrand: error: |
|
+tokenPaymentParamsWithCheckoutID:tokenID: cardBrand:CVV:error: |
+tokenPaymentParamsWithCheckoutID:tokenID: cardPaymentBrand:CVV:error: |
|
-initWithCheckoutID:tokenID:brand:error: |
-initWithCheckoutID:tokenID:paymentBrand:error: |
|
-initWithCheckoutID:tokenID:cardBrand:CVV:error: |
-initWithCheckoutID:tokenID:cardPaymentBrand:CVV: error: |
|
+isCvvValid:forBrand: |
+isCvvValid: |
|
+isCvvValid:forPaymentBrand: |
+isCvvValid: |
|
OPPAlipayPaymentParams | Use OPPPaymentParams with brand "ALIPAY" instead. |
|
OPPBankAccountPaymentParams | Use OPPPaymentParams class with payment brand "BOLETO" instead. |
|
OPPPayPalPaymentParams | Use OPPPaymentParams with brand "PAYPAL". |
|
OPPTransaction | ||
@property NSString *alipaySignedOrderInfo |
transaction.brandSpecificInfo[ OPPTransactionAlipaySignedOrderInfoKey] |
|
OPPCheckoutInfo | ||
+checkoutInfoWithAmount:currencyCode:tokens: paymentBrandsConfig: |
Use default constructor and properties. | |
-initWithAmount:currencyCode:tokens: paymentBrandsConfig: |
Use default constructor and properties. | |
+checkoutInfoFromJSON: |
+checkoutInfoFromJSON:error: |
Deprecated in 2.x.x | Use instead in 3.x.x | |
---|---|---|
PaymentParamsBrand | Not used anymore. Use strings for payment brands instead, e.g. "VISA". | |
PaymentParams | ||
PaymentParams(String, PaymentParamsBrand) |
PaymentParams(String, String) |
|
getBrand() |
getPaymentBrand() |
|
addCustomParam(String, String) |
addParam(String, String) |
|
addAdditionalParams(String, String) |
addParam(String, String) |
|
removeCustomParam(String) |
removeParam(String) |
|
CardPaymentParams | ||
CardPaymentParams(String, PaymentParamsBrand, String, String, String, String, String) |
CardPaymentParams(String, String, String, String, String, String, String) |
|
isCvvValid(String, String) |
isCvvValid(String) |
|
isNumberValid(String, String) |
isNumberValid(String) |
|
TokenPaymentParams | ||
TokenPaymentParams(String, String, PaymentParamsBrand) |
TokenPaymentParams(String, String, String) |
|
TokenPaymentParams(String, String, PaymentParamsBrand, String) |
TokenPaymentParams(String, String, String, String) |
|
AlipayPaymentParams | Use PaymentParams with "ALIPAY" payment brand instead. |
|
BankAccountPaymentParams | ||
createBoletoPaymentParams(String) |
Use PaymentParams(String, String) with "BOLETO" as a second parameter instead. |
|
PaypalPaymentParams | Use PaymentParams with "PAYPAL" payment brand instead. |
|
PayWithGooglePaymentParams | GooglePayPaymentParams |
|
Token | ||
Token(String, PaymentParamsBrand, Card) |
Token(String, String, Card) |
|
Token(String, PaymentParamsBrand, BankAccount) |
Token(String, String, BankAccount) |
|
Transaction | ||
getAlipaySignedOrderInfo() |
brandSpecificInfo[ALIPAY_SIGNED_ORDER_INFO] |
|
ErrorCode | ||
ERROR_CODE_PAYMENT_PARAMS_CARD_MOBILE_PHONE_NUMBER_INVALID |
ERROR_CODE_PAYMENT_PARAMS_MOBILE_PHONE_INVALID |
|
ERROR_CODE_PAY_WITH_GOOGLE |
ERROR_CODE_GOGGLEPAY |
|
PaymentError | ||
getPaymentParamsCardBrandInvalidError() |
Not used anymore. | |
getPaymentParamsTokenizationUnsupportedError() |
Not used anymore. | |
getPaymentProviderSecurityInvalidChecksumError() |
Not used anymore. | |
getPaymentProviderSecuritySSLValidationError() |
Not used anymore. |
Migrating to 2.x.x
The main change in versions 2.x.x is that 3rd party libraries are not included in base SDK anymore:Therefore if you would like to use these features, additional frameworks should be added to the app along with base SDK:
- Drag and drop needed libraries to the "Frameworks" folder of your project.
OPPWAMobile-CardIO.framework
OPPWAMobile-Alipay.framework
- Make sure the frameworks are added to the
Embedded Binaries
as well. - Add a Run Script
- Go to the app target’s Build Phases tab.
- In Xcode menu, select Editor > Add Build Phase > Add Run Script Build Phase. You should now see a Run Script section in your Build Phase options.
Important: "Run Script" phase should be put after "Embed Framework" phase. You can reoder build phases by dragging them using your mouse. - Set it to use
/bin/sh
and check the Run script only when installing option. - Enter the following script:
The framework contains a build for both the simulator (i386, x86_64) and the actual devices (ARM). As it is not permitted to submit a binary for an unsupported architecture to App Store, you have to add script that "manually" removes unused architectures from the final binary.
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
find "$APP_PATH" -name 'OPPWAMobile*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
EXTRACTED_ARCHS=()
for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done
echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"
echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done
Since version 2.0.0 you also don't need to link specific frameworks for 3rd party libraries:
- Accelerate
- AudioToolbox
- AVFoundation
- CoreMedia
- MobileCoreServices
- CoreTelephony
- CoreMotion
- libz.tbd
- libc++.tbd
Therefore if you would like to use these features, additional dependencies should be added to your
build.gradle
:
To enable CardIO add the following dependency to your build.gradle
:
compile "io.card:android-sdk:5.5.1"
To enable Alipay import
oppwa.mobile.alipay.aar
into your project (File > New > New Module > Import .JAR/.AAR Package).
Then, reference it from your application (File > Project Structure > Dependencies > Add Module Dependency).