### Install Pods after Environment Change in iOS
Source: https://developer.meawallet.com/mpp/react-native/installation
Navigate to the ios directory and run 'pod install' to update dependencies after changing the environment and cleaning the build folder.
```bash
cd ios && npm exec -c 'pod install'
```
--------------------------------
### Complete Public Key Decryption Example
Source: https://developer.meawallet.com/manuals/public-key-decryption
This example demonstrates the full workflow of generating a one-time session key, encrypting it with a public key, and then decrypting response data. It requires the Bouncy Castle security provider for PKCS7Padding and OAEPPadding.
```java
private static final String MODULUS = "00A40828F91B332BEA96F9B15DD220A34BF5322F7A3D99C5EC2FC5398CABE52F43F408444368EDDA144D3A25F2DEF231759537F1C9DA55CF60D166DA5C5C04E161B4F7E787C15044C7368AADA3744CDAA12C9F604F16939A99106BDAC77E4D9B446CB3A56791E4409F4812010087F16D10BFFA3EE34D66A9B2EDE5FE8971C6C2AF1870BE1F5D3AFCAAE558D695F53261EB4BF2AA7F7B1FC2FF7394C78CB6542A4F2F7B4842A1DC05968614CF9B7B9BD125D742A701CA6F8A9BA08D4AE58A7BFC3F2975A2E2FABE26853DFF0DC1EA5C8C471938846BA21DF26CF90C1E2D680B92BDE7D76918CCF1DEFDD0ABC34322CED7D73619B40CA6D12C50AD5179F0A4EDFA1B";
private static final String PUBLIC_EXPONENT = "010001";
private static final String SECRET_KEY_TRANSFORMATION = "AES/CBC/PKCS7Padding";
private static final String PROVIDER = BouncyCastleProvider.PROVIDER_NAME;
static {
// Might be necessary for PKCS7Padding support
Security.addProvider(new BouncyCastleProvider());
}
public static void main(String[] args) throws Exception {
// 1. Client generates AES-256 bit one-time session key (SK);
SecretKey oneTimeSessionKey = generateOneTimeSessionKey();
// 2. Encrypt (wrap) the session key with MeaWallet’s Public Key (G1 key);
PublicKey publicKey = buildRsaPublicKey(Hex.decodeHex(MODULUS), Hex.decodeHex(PUBLIC_EXPONENT));
String encryptedSecretKeyHex = encryptSessionKey(oneTimeSessionKey, publicKey);
// 3. Client sends wrapped one time session key to MeaWallet together with publicKeyFingerprint which was used for encryption;
System.out.println("Wrapped one time session key: " + encryptedSecretKeyHex);
// 4. MeaWallet responds with encrypted sensitive data using the one-time session key;
// 5. Client decrypts sensitive data using its session key;
byte[] decryptedData = decryptPayload(oneTimeSessionKey, encryptedMeaWalletResponseData, IV);
System.out.println("Data decrypted with one time session key: " + new String(decryptedData, StandardCharsets.UTF_8));
}
```
```java
private static SecretKey generateOneTimeSessionKey() throws NoSuchAlgorithmException {
KeyGenerator keyGen = KeyGenerator.getInstance("AES");
keyGen.init(256);
return keyGen.generateKey();
}
```
```java
public static PublicKey buildRsaPublicKey(byte[] modulus, byte[] exponent) throws NoSuchAlgorithmException, InvalidKeySpecException {
RSAPublicKeySpec spec = new RSAPublicKeySpec(new BigInteger(1, modulus), new BigInteger(1, exponent));
KeyFactory factory = KeyFactory.getInstance("RSA");
return factory.generatePublic(spec);
}
```
```java
private static String encryptSessionKey(SecretKey sessionKey, Key publicKey) throws GeneralSecurityException {
Cipher cipher = Cipher.getInstance("RSA/ECB/OAEPPadding", PROVIDER);
OAEPParameterSpec oaepParameterSpec = new OAEPParameterSpec(
"SHA-512", "MGF1", MGF1ParameterSpec.SHA512, PSource.PSpecified.DEFAULT);
cipher.init(Cipher.ENCRYPT_MODE, publicKey, oaepParameterSpec);
byte[] encryptedKey = cipher.doFinal(sessionKey.getEncoded());
return Hex.encodeHexString(encryptedKey);
}
```
```java
private static byte[] decryptPayload(SecretKey secretKey, String encryptedData, String iv) throws Exception {
byte[] encryptedDataBytes = Hex.decodeHex(encryptedData);
IvParameterSpec ivParameterSpec = new IvParameterSpec(Hex.decodeHex(iv));
Cipher payloadCipher = initPayloadDecryptionKey(secretKey, ivParameterSpec);
return payloadCipher.doFinal(encryptedDataBytes);
}
```
```java
private static Cipher initPayloadDecryptionKey(SecretKey secretKey, IvParameterSpec iv) throws Exception {
Cipher payloadCipher = Cipher.getInstance(SECRET_KEY_TRANSFORMATION);
payloadCipher.init(Cipher.DECRYPT_MODE, secretKey, iv);
return payloadCipher;
}
```
--------------------------------
### Install Expo Config Plugins
Source: https://developer.meawallet.com/mpp/react-native/installation
Install the necessary Expo config plugins package to enable custom native project configurations.
```bash
npm install --save-dev @expo/config-plugins
```
--------------------------------
### App Launch URL Scheme Example
Source: https://developer.meawallet.com/mpp/ios/implementation-guide
This is an example of the custom URL scheme used to launch the issuer's app from Apple Wallet, including query parameters for pass identification.
```plaintext
"appLaunchURL":["scheme://path"]
```
```plaintext
scheme://path?passTypeIdentifier=paymentpass.com.apple&action=verify&serialNumber=pr.prod.pod1_1...
```
--------------------------------
### Bundle IDs for Wallet Extensions
Source: https://developer.meawallet.com/mpp/react-native/wallet-extensions-guide
Example bundle identifiers for the main app and its associated Issuer extensions.
```plaintext
com.meawallet.app
com.meawallet.app.IssuerNonUIExtension
com.meawallet.app.IssuerUIExtension
```
--------------------------------
### InitializationFailedException
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/InitializationFailedException.html
Thrown if the library initialization fails. Use `MeaCheckedException.getErrorCode()` to get failure reason error code for exception.
```APIDOC
## Class: InitializationFailedException
### Description
Thrown if the library initialization fails. Use `MeaCheckedException.getErrorCode()` to get failure reason error code for exception.
### Hierarchy
`java.lang.Object` -> `java.lang.Throwable` -> `java.lang.Exception` -> `com.meawallet.mtp.MeaCheckedException` -> `com.meawallet.mtp.InitializationFailedException`
### Implemented Interfaces
`Serializable`
### Inherited Methods from `MeaCheckedException`
- `getCardId()`
- `getEligibilityReceipt()`
- `getErrorCode()`
- `getMeaError()`
### Inherited Methods from `Throwable`
- `addSuppressed(Throwable suppressed)`
- `fillInStackTrace()`
- `getCause()`
- `getLocalizedMessage()`
- `getMessage()`
- `getStackTrace()`
- `getSuppressed()`
- `initCause(Throwable cause)`
- `printStackTrace()`
- `printStackTrace(java.io.PrintStream s)`
- `printStackTrace(java.io.PrintWriter s)`
- `setStackTrace(StackTraceElement[] stackTrace)`
- `toString()`
### Inherited Methods from `Object`
- `equals(Object obj)`
- `getClass()`
- `hashCode()`
- `notify()`
- `notifyAll()`
- `wait()`
- `wait(long timeout)`
- `wait(long timeout, int nanos)`
```
--------------------------------
### MeaProductConfig Constructor
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaProductConfig.html
Initializes a new instance of the MeaProductConfig class.
```APIDOC
## MeaProductConfig()
### Description
Constructs a new MeaProductConfig object.
### Constructor
`public MeaProductConfig()`
```
--------------------------------
### Install MPP React Native Package with yarn
Source: https://developer.meawallet.com/mpp/react-native/installation
Install the react-native-mpp package using yarn after configuring access to the private registry.
```bash
yarn add @meawallet/react-native-mpp
```
--------------------------------
### MeaInitializeDigitizationParameters.withReceipt(String receipt, String bin)
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaInitializeDigitizationParameters.html
Creates digitization parameters with push account receipt data.
```APIDOC
## MeaInitializeDigitizationParameters.withReceipt(String receipt, String bin)
### Description
Creates digitization parameters with push account receipt data, in case of Mastercard obtained from MDES Token Connect.
### Method
static MeaInitializeDigitizationParameters
### Parameters
- **receipt** (String) - Required - The push account receipt data.
- **bin** (String) - Optional - The Bank Identification Number.
```
--------------------------------
### Install MPP React Native Package with npm
Source: https://developer.meawallet.com/mpp/react-native/installation
Install the react-native-mpp package using npm after configuring access to the private registry.
```bash
npm install @meawallet/react-native-mpp --save
```
--------------------------------
### MeaInitializeDigitizationParameters Methods
Source: https://developer.meawallet.com/api/mtp/index-all.html
Methods for initializing digitization parameters.
```APIDOC
## MeaInitializeDigitizationParameters Class Methods
### Methods
- **getExpiryYear()**
- Description: Retrieves the expiry year.
- Return Type: Integer
- **getInitialVector()**
- Description: Retrieves the initial vector.
- Return Type: String
- **getPan()**
- Description: Retrieves the Primary Account Number (PAN).
- Return Type: String
```
--------------------------------
### Associated Application Identifiers Example
Source: https://developer.meawallet.com/mpp/ios/wallet-extensions-guide
Example of associated application identifiers for an issuer app and its extensions. These are used to associate passes with specific applications.
```plaintext
A1B2C3D4E5.com.meawallet.app
A1B2C3D4E5.com.meawallet.app.IssuerNonUIExtension
A1B2C3D4E5.com.meawallet.app.IssuerUIExtension
```
--------------------------------
### initialize
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaTokenPlatform.html
Initializes the MeaTokenPlatform library.
```APIDOC
## initialize
### Description
Initializes the MeaTokenPlatform library.
### Method
static void
### Signature
initialize(android.content.Context context)
### Parameters
- **context** (android.content.Context) - The application context.
```
--------------------------------
### Initialize MeaPushProvisioning
Source: https://developer.meawallet.com/mpp/android/google-pay
Initializes the MeaPushProvisioning instance. If a custom configuration file is used, provide its name during initialization.
```APIDOC
## Initialize MeaPushProvisioning
### Description
Initializes the MeaPushProvisioning instance. If a custom configuration file is used, provide its name during initialization.
### Code
```java
if (!MeaPushProvisioning.isInitialized()) {
MeaPushProvisioning.initialize(this);
}
```
### Custom Configuration
### Description
When no default `mea_config` exists and a custom config file name is used instead, call method `MeaPushProvisioning.initialize(this, "custom_config_file_name")` for initialization.
### Code
```java
MeaPushProvisioning.initialize(this, "custom_config_file_name");
```
```
--------------------------------
### Example iFrame with Clipboard Write Permission
Source: https://developer.meawallet.com/mcd/web/implementation-guide
An example of an iframe element with the 'allow' attribute set for 'clipboard-write' permission, including the environment URL.
```html
```
--------------------------------
### Build and Run in Release Mode
Source: https://developer.meawallet.com/mpp/react-native/wallet-extensions-guide
Use this command to build and run your App and bundled Extensions in Release mode for better performance and memory usage.
```bash
npm run ios -- --mode="Release"
```
--------------------------------
### Initialize MeaPushProvisioning
Source: https://developer.meawallet.com/mpp/react-native/implementation-guide
Initialize the MeaPushProvisioning instance to begin using the MPP SDK. Handles success and error logging.
```javascript
import MeaPushProvisioning from '@meawallet/react-native-mpp';
// ...
MeaPushProvisioning.initialize()
.then(() => console.log("Success"))
.catch((error) => console.error("Error: " + error));
```
--------------------------------
### Start Activity When App Not in Foreground
Source: https://developer.meawallet.com/mtp/implementation-guide
Conditionally start an activity when the app is not in the foreground. Depending on the Android version and requirements, this could involve showing a notification or opening an activity over the lock screen.
```java
Intent activityIntent = new Intent(context, activityClass);
activityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
activityIntent.putExtra(INTENT_START_OVER_LOCK_SCREEN, 1);
activityIntent.putExtra(...);
// ...
context.startActivity(activityIntent);
```
--------------------------------
### MTP SDK Initialization in Application.onCreate
Source: https://developer.meawallet.com/mtp/implementation-guide
Example of initializing the MTP SDK within the onCreate method of an Application subclass. Includes error handling for initialization failures and registration of device unlock and transaction receivers if the SDK is registered.
```java
public class IssuerApplication extends Application {
@Override
public void onCreate() {
try {
MeaTokenPlatform.initialize(this);
} catch (InitializationFailedException ex) {
MeaErrorCode errorCode = ex.getErrorCode();
...
}
if (MeaTokenPlatform.isRegistered()) {
MeaTokenPlatform.registerDeviceUnlockReceiver();
MeaTokenPlatform.registerTransactionReceiver(this, new TransactionReceiver());
...
}
}
}
```
--------------------------------
### Initialize MeaPushProvisioning SDK
Source: https://developer.meawallet.com/mpp/android/google-pay
Initialize the MeaPushProvisioning SDK if it has not been initialized already. A custom configuration file name can be provided if 'mea_config' is not used.
```java
if (!MeaPushProvisioning.isInitialized()) {
MeaPushProvisioning.initialize(this);
}
```
```java
MeaPushProvisioning.initialize(this, "custom_config_file_name");
```
--------------------------------
### Implement MeaTransactionReceiver for Transaction Events
Source: https://developer.meawallet.com/mtp/implementation-guide
Extend MeaTransactionReceiver to handle various transaction events like started, submitted, and failed. Pay attention to Android 10+ restrictions on starting activities from the background.
```java
public class TransactionReceiver extends MeaTransactionReceiver {
@Override
public void handleOnTransactionStartedIntent(Context context, String cardId) {
...
if (!isAppInForeground()) {
startActivityWhenNotInForeground(...);
}
...
}
@Override
public void handleOnTransactionSubmittedIntent(Context context,
String cardId,
MeaContactlessTransactionData data) {
...
if (!isAppInForeground()) {
startActivityWhenNotInForeground(...);
}
...
}
@Override
public void handleOnTransactionFailureIntent(Context context,
String cardId,
MeaError error,
MeaContactlessTransactionData data) {
...
switch (error.getCode()) {
case TRANSACTION_ABORTED:
case TRANSACTION_CARD_ERROR:
case TRANSACTION_TERMINAL_ERROR:
case TRANSACTION_FAILED:
case TRANSACTION_AUTHENTICATE_OFFLINE:
case TRANSACTION_DECLINED_BY_TERMINAL:
case TRANSACTION_MAGSTRIPE_TERMINAL_V2_ERROR:
case TRANSACTION_MANAGER_BUSY:
case TRANSACTION_MISSING_ICC:
case TRANSACTION_COMMAND_INCOMPATIBLE:
case TRANSACTION_INSUFFICIENT_POI_AUTHENTICATION:
case TRANSACTION_UNSUPPORTED_TRANSIT:
case TRANSACTION_CONDITIONS_NOT_ALLOWED:
case TRANSACTION_DECLINED_BY_CARD:
...
break;
case TRANSACTION_DECLINED_DEVICE_SCREEN_IS_OFF:
...
break;
case TRANSACTION_DECLINED_LIMIT_EXCEEDED:
...
break;
case CARD_NO_PAYMENT_TOKENS:
...
break;
case DEVICE_UNLOCK_KEY_INVALIDATED:
...
break;
case TRANSACTION_CONTEXT_NOT_MATCHING:
...
break;
...
}
...
if (!isAppInForeground()) {
```
--------------------------------
### Initialize MeaPushProvisioning with Custom Config
Source: https://developer.meawallet.com/mpp/android/samsung-pay
Initialize MeaPushProvisioning with a custom configuration file name. The configuration file should be placed in the application's res/raw folder.
```java
MeaPushProvisioning.initialize(this, "custom_config_file_name");
```
--------------------------------
### MeaTransactionMessage.getCurrency
Source: https://developer.meawallet.com/api/mtp/index-all.html
Gets the transaction currency.
```APIDOC
## getCurrency()
### Description
Get the transaction currency.
### Method
N/A (Method within a class)
### Class
com.meawallet.mtp.MeaTransactionMessage
```
--------------------------------
### Status Polling Strategy Example
Source: https://developer.meawallet.com/mpp/click-to-pay/batch-enrollment-requirements
Illustrates the sequential polling process for enrollment status, including wait times and decision points based on status responses. This example demonstrates the exponential backoff strategy for status requests.
```text
Step 1: Enroll
├─ Request Enroll
├─ Wait 5s → Request Status (Attempt 1)
└─ Request Status with requestId
├─ If status = SUCCESS → proceed
│
└─ If status = IN_PROGRESS
| ├─ Wait 10s → Request Status (Attempt 2)
| └─ Request Status with requestId
| ├─ If status = SUCCESS → proceed
| │
| └─ If status = IN_PROGRESS
| ├─ Wait 15s → Request Status (Attempt 3)
| └─ Request Status with requestId
| ├─ If status = SUCCESS → proceed
| |
| └─ If status = IN_PROGRESS
| ├─ Wait 30s → Request Status (Attempt 4 - FINAL)
| └─ Request Status with requestId
| ├─ If status = SUCCESS → proceed
| |
| └─ IN_PROGRESS → TIMEOUT
└─ If status = FAILED → stop, log, escalate
```
--------------------------------
### initializeOemTokenization
Source: https://developer.meawallet.com/api/mpp/react-native
Initiates the in-app push provisioning flow.
```APIDOC
## initializeOemTokenization(cardDataParameters)
### Description
Initiates in-app push provisioning with the MppCardDataParameters parameter. Checks if the payment card can be added to Apple Pay by using primaryAccountIdentifier in response.
### Parameters
- **cardDataParameters** (MppCardDataParameters) - Required - Card data parameters as instance of MppCardDataParameters containing the card information.
### Returns
- Promise: Initialization response data in case of success.
```
--------------------------------
### Initialize MeaPushProvisioning
Source: https://developer.meawallet.com/mpp/android/samsung-pay
Initializes the MeaPushProvisioning SDK. It's recommended to check if it's already initialized before calling this method. A custom configuration file can also be specified.
```APIDOC
## Initialize MeaPushProvisioning
To begin, initialize the `MeaPushProvisioning` instance.
```java
if (!MeaPushProvisioning.isInitialized()) {
MeaPushProvisioning.initialize(this);
}
```
For custom configuration files:
```java
MeaPushProvisioning.initialize(this, "custom_config_file_name");
```
```
--------------------------------
### getInstallments
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaTransactionDetails.html
Retrieves the number of installments for the transaction.
```APIDOC
## getInstallments()
### Description
Returns the number of installments for the transaction.
### Method
`getInstallments()`
### Returns
- `int`: installments count as int.
```
--------------------------------
### Initialize Card Data Parameters with Card ID & Secret
Source: https://developer.meawallet.com/mpp/android/google-pay
Prepare card data parameters using Card ID and Card Secret for push provisioning. Ensure these values are securely obtained.
```java
String cardId = "";
String cardSecret = "";
MppCardDataParameters cardParams = MppCardDataParameters.withCardSecret(cardId, cardSecret);
```
--------------------------------
### getValue()
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaCardState.html
Get Enum int value.
```APIDOC
### getValue
public int getValue()
Get Enum int value.
Returns:
Equivalent int value.
```
--------------------------------
### initialize
Source: https://developer.meawallet.com/api/mpp/react-native
Initializes the MeaPushProvisioning library. This method must be called before any other MeaPushProvisioning API methods.
```APIDOC
## initialize(configFileName?)
### Description
Initializes the MeaPushProvisioning library. It is required to call this method before interacting with any other of the MeaPushProvisioning API's.
### Parameters
- **configFileName** (string?) - Optional - Configuration file name, defaults to `mea_config`
### Returns
- `Promise`
```
--------------------------------
### MeaTokenPlatform.initialize
Source: https://developer.meawallet.com/api/mtp/index-all.html
Initializes the MeaTokenPlatform library. Can be done on the main thread or a background thread.
```APIDOC
## initialize(Context)
### Description
Initializes the MeaTokenPlatform library.
### Method
Static
### Parameters
- **Context**: The application context.
```
```APIDOC
## initialize(Context, MeaListener)
### Description
Initializes the MeaTokenPlatform library on a background thread.
### Method
Static
### Parameters
- **Context**: The application context.
- **MeaListener**: A listener to receive initialization status.
```
--------------------------------
### isWalletAvailable
Source: https://developer.meawallet.com/api/mpp/react-native
Checks if Samsung Pay is installed on device.
```APIDOC
## isWalletAvailable(context: any)
### Description
Checks if Samsung Pay is installed on device.
### Parameters
#### Path Parameters
- None
#### Query Parameters
- None
#### Request Body
- **context** (any) - Required - Application context.
### Response
#### Success Response (200)
- **boolean** - Promise with true value if Samsung Pay is installed on device, false otherwise.
### Request Example
```json
{
"context": "android_context_object"
}
```
### Response Example
```json
true
```
```
--------------------------------
### MeaContactlessTransactionData.getDisplayableAmountAndCurrency
Source: https://developer.meawallet.com/api/mtp/index-all.html
Gets the displayable amount and currency for the transaction.
```APIDOC
## getDisplayableAmountAndCurrency()
### Description
Get the transaction displayable amount and currency.
### Method
N/A (Method within an interface)
### Interface
com.meawallet.mtp.MeaContactlessTransactionData
```
--------------------------------
### initialize with listener
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaTokenPlatform.html
Initializes the MeaTokenPlatform library on a background thread.
```APIDOC
## initialize
### Description
Initializes the MeaTokenPlatform library, initialization is done on a background thread.
### Method
static void
### Signature
initialize(android.content.Context context, MeaListener listener)
### Parameters
- **context** (android.content.Context) - The application context.
- **listener** (MeaListener) - The listener to handle the initialization callback.
```
--------------------------------
### MeaErrorCode.getDescription
Source: https://developer.meawallet.com/api/mtp/index-all.html
Get the description for a given error code.
```APIDOC
## getDescription(int)
### Description
Get error code description.
### Method
Static method
### Parameters
#### Path Parameters
- **errorCode** (int) - Required - The error code to get the description for.
### Class
com.meawallet.mtp.MeaErrorCode
```
--------------------------------
### MeaContactlessTransactionData.getDate
Source: https://developer.meawallet.com/api/mtp/index-all.html
Gets the date and time when the transaction occurred.
```APIDOC
## getDate()
### Description
Get the date/time when the transaction occurred.
### Method
N/A (Method within an interface)
### Interface
com.meawallet.mtp.MeaContactlessTransactionData
```
--------------------------------
### Initialize MeaPushProvisioning
Source: https://developer.meawallet.com/mpp/android/samsung-pay
Initialize the MeaPushProvisioning instance at the beginning of your issuer app. Use the overloaded method with a custom config file name if needed.
```java
if (!MeaPushProvisioning.isInitialized()) {
MeaPushProvisioning.initialize(this);
}
```
--------------------------------
### MeaContactlessTransactionData.getCurrency
Source: https://developer.meawallet.com/api/mtp/index-all.html
Gets the currency code for a contactless transaction.
```APIDOC
## getCurrency()
### Description
Get the currency code the transaction was for.
### Method
N/A (Method within an interface)
### Interface
com.meawallet.mtp.MeaContactlessTransactionData
```
--------------------------------
### getDefaultTransactionLimit
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaTokenPlatform.html
Get the default transaction limit amount.
```APIDOC
## getDefaultTransactionLimit
### Description
Returns default transaction limit amount, amount value includes decimals. The last two digits of value are decimals. 10000 = 100.00 EUR. Default transaction limit is used always when currency don't have its explicitly defined transaction limit. If both currency specific limit and default limit are not set, then for this currency library will not check transaction amount.
### Method
@Nullable public static Integer getDefaultTransactionLimit() throws NotInitializedException
### Returns
- **Integer** - Returns default transaction limit max amount, amount value includes decimals.
### Throws
- **NotInitializedException** - if library is not initialized.
```
--------------------------------
### Project Structure for MeaConfig
Source: https://developer.meawallet.com/mpp/react-native/installation
Illustrates the recommended project structure for placing the mea_config file and its associated config plugins.
```plaintext
my-project/
├─ app.json # or app.config.js
├─ package.json
├─ meawallet/
│ ├─ configAndroid.js # Android config plugin
│ ├─ configIos.js # iOS config plugin
│ └─ mea_config # Mea config file
└─ ...
```
--------------------------------
### Initialize Card Digitization with Receipt
Source: https://developer.meawallet.com/mtp/implementation-guide
Initializes card digitization using a previously obtained eligibility receipt and the card's BIN.
```java
MeaInitializeDigitizationParameters digitizationParametersWithReceipt =
MeaInitializeDigitizationParameters.withReceipt(receipt, bin);
```
--------------------------------
### getTransactionCredentialsCount
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaCard.html
Gets the number of available transaction credentials.
```APIDOC
## getTransactionCredentialsCount
### Description
Get number of available transaction credentials.
### Method
@Nullable Integer getTransactionCredentialsCount()
### Returns
number of available transaction credentials as Integer.
### Throws
`NotInitializedException` - if library is not initialized.
`NotRegisteredException` - if library is not registered.
`MeaException` - if any other error occurred while processing method.
```
--------------------------------
### GetCredentialTransportKeyWorker
Source: https://developer.meawallet.com/api/mtp/allclasses-index.html
Worker for getting credential transport keys.
```APIDOC
## Class GetCredentialTransportKeyWorker
### Description
Worker for getting credential transport keys.
```
--------------------------------
### onCreate
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaHceService.html
Called when the service is first created.
```APIDOC
## onCreate()
### Description
Called when the service is first created. This method is overridden from the base Service class.
### Method
`public void onCreate()`
### Overrides
`onCreate` in class `android.app.Service`
```
--------------------------------
### MeaCheckedException.getEligibilityReceipt
Source: https://developer.meawallet.com/api/mtp/index-all.html
Gets the eligibility receipt for the card related to this exception.
```APIDOC
## getEligibilityReceipt()
### Description
Get eligibility receipt for card related to this exception.
### Method
N/A (Method within an exception)
### Exception
com.meawallet.mtp.MeaCheckedException
```
--------------------------------
### Initialize PKAddPaymentPassViewController in Objective-C
Source: https://developer.meawallet.com/mpp/ios/implementation-guide
Instantiate PKAddPaymentPassViewController to prompt the user to add a pass to their Wallet. Requires request configuration data and a delegate conforming to PKAddPaymentPassViewControllerDelegate.
```objective-c
PKAddPaymentPassRequestConfiguration *addPaymentPassRequestConfiguration = [self.tokenizationResponseData addPaymentPassRequestConfiguration];
[addPaymentPassRequestConfiguration setCardholderName:@"Cardholder Name"];
PKAddPaymentPassViewController *paymentPassController =
[[PKAddPaymentPassViewController alloc] initWithRequestConfiguration:addPaymentPassRequestConfiguration delegate:self];
[self presentViewController:paymentPassController animated:YES completion:nil];
```
--------------------------------
### getTransactionHistory
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaCard.html
Gets card transactions history data for this card.
```APIDOC
## getTransactionHistory
### Description
Gets card transactions history data for the this card.
### Method
void getTransactionHistory(MeaGetCardTransactionHistoryListener listener)
### Parameters
#### Path Parameters
- **listener** (MeaGetCardTransactionHistoryListener) - Listener for card transaction history results.
```
--------------------------------
### InitializationFailedException
Source: https://developer.meawallet.com/api/mtp/allclasses-index.html
Thrown if the library initialization fails.
```APIDOC
## Class InitializationFailedException
### Description
Thrown if the library initialization fails.
```
--------------------------------
### MeaInitializeDigitizationParameters
Source: https://developer.meawallet.com/api/mtp/allclasses-index.html
Card Initialize Digitization parameters. Use this class to configure the parameters for initializing card digitization.
```APIDOC
## Class MeaInitializeDigitizationParameters
### Description
Card Initialize Digitization parameters.
### Inner Class
- **InitializeDigitizationType**: Initialize Card Digitization parameter type.
```
--------------------------------
### Cryptogram Type
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaRemotePaymentData.html
Methods for getting and setting the cryptogram type.
```APIDOC
## Method
### getCryptogramType
`public RemoteCryptogramType getCryptogramType()`
Retrieves the cryptogram type.
**Returns:**
* Cryptogram type.
```
```APIDOC
## Method
### setCryptogramType
`public MeaRemotePaymentData setCryptogramType(RemoteCryptogramType remoteCryptogramType)`
Sets the cryptogram type.
**Parameters:**
* `remoteCryptogramType` - Cryptogram type.
**Returns:**
* `MeaRemotePaymentData` object.
```
--------------------------------
### MeaInitializeDigitizationListener
Source: https://developer.meawallet.com/api/mtp/index-all.html
Listener interface for initializing the digitization process.
```APIDOC
## onSuccess
### Description
Called when the initialization of the digitization operation completed successfully.
### Parameters
- **MeaEligibilityReceipt** (MeaEligibilityReceipt) - The eligibility receipt.
- **String** (String) - A string value.
- **boolean** (boolean) - A boolean value indicating success or failure.
```
--------------------------------
### Transaction Type
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaRemotePaymentData.html
Methods for getting and setting the transaction type.
```APIDOC
## Method
### getTransactionType
`public byte getTransactionType()`
Retrieves the type of the transaction.
**Returns:**
* Transaction type as byte.
```
```APIDOC
## Method
### setTransactionType
`public MeaRemotePaymentData setTransactionType(byte transactionType)`
Sets the type of the transaction.
**Parameters:**
* `transactionType` - Transaction type as byte.
**Returns:**
* `MeaRemotePaymentData` object.
```
--------------------------------
### Initialize PKAddPaymentPassViewController in Swift
Source: https://developer.meawallet.com/mpp/ios/implementation-guide
Instantiate PKAddPaymentPassViewController to prompt the user to add a pass to their Wallet. Requires request configuration data and a delegate conforming to PKAddPaymentPassViewControllerDelegate.
```swift
let addPaymentPassRequestConfiguration = self.tokenizationResponseData?.addPaymentPassRequestConfiguration
addPaymentPassRequestConfiguration?.cardholderName = "Cardholder Name"
let paymentPassController = PKAddPaymentPassViewController.init(requestConfiguration: addPaymentPassRequestConfiguration!, delegate: self)
self.present(paymentPassController!, animated: true, completion: nil)
```
--------------------------------
### Country Code
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaRemotePaymentData.html
Methods for getting and setting the country code.
```APIDOC
## Method
### getCountryCode
`@Nullable public Integer getCountryCode()`
Retrieves the 3 digit numeric country code.
**Returns:**
* Country code.
```
```APIDOC
## Method
### setCountryCode
`public MeaRemotePaymentData setCountryCode(Integer countryCode)`
Sets the 3 digit numeric country code.
**Parameters:**
* `countryCode` - Country code as Integer.
**Returns:**
* `MeaRemotePaymentData` object.
```
--------------------------------
### MeaHceService Constructor
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaHceService.html
Initializes a new instance of the MeaHceService class.
```APIDOC
## MeaHceService()
### Description
Initializes a new instance of the MeaHceService class.
### Constructor
`public MeaHceService()`
```
--------------------------------
### Currency Code
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaRemotePaymentData.html
Methods for getting and setting the currency code.
```APIDOC
## Method
### getCurrencyCode
`public int getCurrencyCode()`
Retrieves the 3 digit numeric currency code.
**Returns:**
* Currency code.
```
```APIDOC
## Method
### setCurrencyCode
`public MeaRemotePaymentData setCurrencyCode(int currencyCode)`
Sets the 3 digit numeric currency code.
**Parameters:**
* `currencyCode` - Currency code as integer.
**Returns:**
* `MeaRemotePaymentData` object.
```
--------------------------------
### MeaTokenPlatform.initializeDigitization
Source: https://developer.meawallet.com/api/mtp/index-all.html
Initializes the card digitization process with provided parameters and a listener.
```APIDOC
## initializeDigitization(MeaInitializeDigitizationParameters, MeaInitializeDigitizationListener)
### Description
Initializes the card digitization process.
### Method
Static
### Parameters
- **MeaInitializeDigitizationParameters**: Parameters for initializing digitization.
- **MeaInitializeDigitizationListener**: Listener for digitization initialization events.
```
--------------------------------
### Transaction Amount
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaRemotePaymentData.html
Methods for getting and setting the transaction amount.
```APIDOC
## Method
### getTransactionAmount
`public long getTransactionAmount()`
Retrieves the amount of the transaction.
**Returns:**
* Transaction amount as long.
```
```APIDOC
## Method
### setTransactionAmount
`public MeaRemotePaymentData setTransactionAmount(long transactionAmount)`
Sets the amount of transaction.
**Parameters:**
* `transactionAmount` - Transaction amount as long.
**Returns:**
* `MeaRemotePaymentData` object.
```
--------------------------------
### MeaDeleteStorageDirectoryListener
Source: https://developer.meawallet.com/api/mtp/allclasses-index.html
Interface for getting callbacks when storage directories are deleted.
```APIDOC
## Interface MeaDeleteStorageDirectoryListener
### Description
Interface for getting callbacks when storage directories are deleted.
```
--------------------------------
### Get Tokens
Source: https://developer.meawallet.com/mtc/ios/implementation-guide
Retrieve all cardholder tokens using the MTC SDK.
```APIDOC
## Get Tokens
### Description
Retrieves all cardholder tokens associated with the provided card parameters.
### Swift
```swift
let cardParams = ""
let cardParams = MeaTokenControl.getTokens(mppCardParameters) { (data, error) in
// Handle response
}
```
### Objective-C
```objectivec
MppCardDataParameters *cardParams = @"";
[MeaTokenControl getTokens:cardParams completionHandler: ^(MtcSearchTokenResponseData *data, NSError *error) {
// Handle response
}];
```
```
--------------------------------
### Enable SDK Logging and Get Version Info (Swift)
Source: https://developer.meawallet.com/mpp/ios/implementation-guide
Enable debug logging for the MeaPushProvisioning SDK and print the SDK's version name and code. This is typically done during application launch.
```swift
import MeaPushProvisioning
...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
MeaPushProvisioning.setDebugLoggingEnabled(true)
print(String(format: "SDK version: %@, code: %@", MeaPushProvisioning.versionName(), MeaPushProvisioning.versionCode()))
...
return true
}
```
--------------------------------
### MeaProductConfig Methods
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaProductConfig.html
Provides methods to retrieve various configuration details for a digitized card product.
```APIDOC
## MeaProductConfig Methods
### getBrandLogoAssetId
Retrieves the asset ID for the brand logo.
- **Returns**: `String` - The asset ID of the brand logo.
### getIsCoBranded
Checks if the product is co-branded.
- **Returns**: `Boolean` - `true` if the product is co-branded, `false` otherwise.
### getCoBrandName
Retrieves the name of the co-brand.
- **Returns**: `String` - The name of the co-brand.
### getCoBrandLogoAssetId
Retrieves the asset ID for the co-brand logo.
- **Returns**: `String` - The asset ID of the co-brand logo.
### getCardBackgroundAssetId
Retrieves the asset ID for the card background image.
- **Returns**: `String` - The asset ID of the card background image.
### getCardBackgroundCombinedAssetId
Retrieves the asset ID for the combined card background image.
- **Returns**: `String` - The asset ID of the combined card background image.
### getForegroundColor
Retrieves the foreground color of the card.
- **Returns**: `String` - The foreground color value.
### getIssuerName
Retrieves the name of the issuer.
- **Returns**: `String` - The name of the issuer.
### getShortDescription
Retrieves the short description of the product.
- **Returns**: `String` - The short description.
### getLongDescription
Retrieves the long description of the product.
- **Returns**: `String` - The long description.
### getIssuerLogoAssetId
Retrieves the asset ID for the issuer logo.
- **Returns**: `String` - The asset ID of the issuer logo.
### getIconAssetId
Retrieves the asset ID for the product icon.
- **Returns**: `String` - The asset ID of the product icon.
### getCustomerServiceUrl
Retrieves the URL for customer service.
- **Returns**: `String` - The customer service URL.
### getCustomerServiceEmail
Retrieves the email address for customer service.
- **Returns**: `String` - The customer service email address.
### getCustomerServicePhoneNumber
Retrieves the phone number for customer service.
- **Returns**: `String` - The customer service phone number.
### getIssuerMobileApp
Retrieves information about the issuer's mobile app.
- **Returns**: `MeaProductConfig.IssuerMobileApp` - An object containing issuer mobile app details.
### getOnlineBankingLoginUrl
Retrieves the URL for online banking login.
- **Returns**: `String` - The online banking login URL.
### getTermsAndConditionsUrl
Retrieves the URL for the terms and conditions.
- **Returns**: `String` - The terms and conditions URL.
### getPrivacyPolicyUrl
Retrieves the URL for the privacy policy.
- **Returns**: `String` - The privacy policy URL.
### getIssuerProductConfigCode
Retrieves the issuer's product configuration code.
- **Returns**: `String` - The issuer product configuration code.
### equals
Compares this MeaProductConfig object to another object for equality.
- **Parameters**:
- `o` (Object) - The object to compare with.
- **Returns**: `boolean` - `true` if the objects are equal, `false` otherwise.
### hashCode
Returns a hash code value for the MeaProductConfig object.
- **Returns**: `int` - A hash code value for this object.
```
--------------------------------
### Get Request Status
Source: https://developer.meawallet.com/api/click-to-pay/consumer-api.yaml
Retrieve Click to Pay request status.
```APIDOC
## POST /mpp/tokenmanage/v1/tokenization/clicktopay/consumer/getRequestStatus
### Description
Retrieve Click to Pay request status.
### Method
POST
### Endpoint
/mpp/tokenmanage/v1/tokenization/clicktopay/consumer/getRequestStatus
### Request Body
- **GetRequestStatusRequest** (object) - Required - The request payload for retrieving request status.
### Response
#### Success Response (200)
- **GetRequestStatusResponse** (object) - The response containing the request status.
```
--------------------------------
### NotInitializedException
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/NotInitializedException.html
Thrown if the library is not initialized. Use `MeaTokenPlatform.initialize(Context)` or `MeaTokenPlatform.initialize(Context, MeaListener)` to initialize the library.
```APIDOC
## Class: NotInitializedException
### Description
This exception is thrown when the MeaWallet MTP library has not been initialized. It indicates that a method was called before the necessary initialization steps were completed.
### Usage
Use `MeaTokenPlatform.initialize(Context)` or `MeaTokenPlatform.initialize(Context, MeaListener)` to initialize the library before performing operations that require it.
### Inheritance
`java.lang.Object`
`java.lang.Throwable`
`java.lang.Exception`
`com.meawallet.mtp.MeaCheckedException`
`com.meawallet.mtp.NotInitializedException`
### Implemented Interfaces
`Serializable`
```
--------------------------------
### MeaTokenPlatform.openSecureNfcSettings
Source: https://developer.meawallet.com/api/mtp/index-all.html
Starts an Android system activity to change Secure NFC settings.
```APIDOC
## openSecureNfcSettings
### Description
Starts the Android system activity to change Secure NFC settings.
### Parameters
- **Activity** (Activity) - The current Android Activity context.
```
--------------------------------
### setDefaultPaymentApplication
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaTokenPlatform.html
Starts the Android system activity to set the default application for payments.
```APIDOC
## setDefaultPaymentApplication
### Description
Starts Android system activity to set default application for payments.
### Method
`static void`
### Signature
`setDefaultPaymentApplication(android.app.Activity activity, int requestCode)`
```
--------------------------------
### MeaTokenPlatform.Configuration Methods
Source: https://developer.meawallet.com/api/mtp/index-all.html
Provides methods to retrieve configuration details for the MTP token platform.
```APIDOC
## versionCode()
### Description
Returns version code of the package.
### Method
static
### Class
com.meawallet.mtp.MeaTokenPlatform.Configuration
```
```APIDOC
## versionName()
### Description
Returns version name of the package.
### Method
static
### Class
com.meawallet.mtp.MeaTokenPlatform.Configuration
```
--------------------------------
### Initialize MPP SDK
Source: https://developer.meawallet.com/mpp/react-native/implementation-guide
Initializes the MPP SDK. This should be called only once during the application's lifetime.
```APIDOC
## Initialize MPP SDK
### Description
Initializes the MPP SDK. This function should be called once when the application starts.
### Method
`MeaPushProvisioning.initialize()`
### Parameters
None
### Request Example
```javascript
MeaPushProvisioning.initialize();
```
```
--------------------------------
### openSecureNfcSettings
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaTokenPlatform.html
Starts the Android system activity to change Secure NFC settings.
```APIDOC
## openSecureNfcSettings
### Description
Starts Android system activity to change Secure NFC settings.
### Method
`static void`
### Signature
`openSecureNfcSettings(android.app.Activity activity)`
```
--------------------------------
### onSuccess
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/MeaInitializeDigitizationListener.html
Called when initialize digitization operation completed successfully.
```APIDOC
## onSuccess
### Description
Called when initialize digitization operation completed successfully.
### Parameters
* `eligibilityReceipt` (MeaEligibilityReceipt) - Provided if both card availability and device eligibility checks were successful.
* `termsAndConditionsAssetId` (String) - Terms and conditions asset Id.
* `isSecurityCodeApplicable` (boolean) - Is CVC2 or CVV required in `MeaTokenPlatform.completeDigitization(String, String, long, String, MeaCompleteDigitizationListener)` method.
```
--------------------------------
### getTokens
Source: https://developer.meawallet.com/api/mpp/react-native
Get Samsung Pay tokens for the specified card. Synchronous method.
```APIDOC
## getTokens(cardData: MppCardDataParameters, walletId: string, deviceId: string)
### Description
Get Samsung Pay tokens for the specified card. Synchronous method.
### Parameters
#### Path Parameters
- None
#### Query Parameters
- None
#### Request Body
- **cardData** (MppCardDataParameters) - Required - Card data object containing the card information.
- **walletId** (string) - Required - Wallet ID of the active wallet.
- **deviceId** (string) - Required - Device ID of the active wallet.
### Response
#### Success Response (200)
- **MppGetTokensResponseData** - Data containing card payment network, last four digits and related tokens.
### Request Example
```json
{
"cardData": { ... },
"walletId": "wallet_abc",
"deviceId": "device_xyz"
}
```
### Response Example
```json
{
"paymentNetwork": "Visa",
"lastFourDigits": "1234",
"tokens": [
"token1",
"token2"
]
}
```
```
--------------------------------
### getRegisteredTokens
Source: https://developer.meawallet.com/api/mpp/react-native
Get a list of tokens and associated metadata registered to the active wallet.
```APIDOC
## getRegisteredTokens()
### Description
Get a list of tokens and associated metadata registered to the active wallet.
### Method
GET
### Endpoint
/samsungpay/tokens/registered
### Parameters
#### Path Parameters
- None
#### Query Parameters
- None
#### Request Body
- None
### Response
#### Success Response (200)
- **Array** - A list of registered Samsung Pay tokens and their metadata.
### Response Example
```json
[
{
"tokenId": "token123",
"cardType": "Visa"
}
]
```
```
--------------------------------
### onCreate
Source: https://developer.meawallet.com/api/mtp/com/meawallet/mtp/FingerprintAuthenticationDialogFragment.html
Called when the fragment is first created. This is where you can do all of your normal fragment initialization.
```APIDOC
## onCreate
### Description
Called when the fragment is first created. This is where you can do all of your normal fragment initialization.
### Method Signature
`public void onCreate(android.os.Bundle savedInstanceState)`
### Overrides
`onCreate` in class `android.app.DialogFragment`
```
--------------------------------
### getActivationCode
Source: https://developer.meawallet.com/api/mpp/react-native
Gets the activation code (authentication code, TAV) for app-to-app verification.
```APIDOC
## getActivationCode
### Description
Gets activation code (authentication code, TAV) for app-to-app verification.
### Method Signature
`getActivationCode(cardData, walletId?, deviceId?)`
### Parameters
- `cardData`
- `walletId` (Optional)
- `deviceId` (Optional)
### Returns
(Return type not specified in source)
```
--------------------------------
### Configure Gradle Repository and Dependencies
Source: https://developer.meawallet.com/mcd/android/installation
Add the MCD SDK to your project by configuring the Maven repository URL and credentials in your build.gradle file. Use the appropriate debug or release implementation based on your build type.
```gradle
repositories {
maven {
url 'https://nexus.ext.meawallet.com/repository/mcd-android-group/'
credentials {
username ''
password ''
}
}
}
dependencies {
debugImplementation 'com.meawallet:mcd-:-debug'
releaseImplementation 'com.meawallet:mcd-:'
}
```
--------------------------------
### Get Consumer Details
Source: https://developer.meawallet.com/mpp/click-to-pay/implementation-guide
Retrieve consumer and card (payment instrument) information.
```APIDOC
## Get Consumer Details
### Description
Retrieve consumer and card (payment instrument) information.
### Method
`getConsumerDetails`
### Parameters
- `MeaPushProvisioning.ClickToPay`: Specifies the service to use.
- `MppPaymentNetwork.VISA` or `paymentNetwork: .visa`: Specifies the payment network.
- `externalConsumerId`: The unique identifier for the consumer.
- `MppConsumerDetailsListener` or completion handler: Callback for success or failure.
### Request Example (Java)
```java
MeaPushProvisioning.getConsumerDetails(MeaPushProvisioning.ClickToPay, MppPaymentNetwork.VISA, externalConsumerId, new MppConsumerDetailsListener() {
@Override
public void onSuccess(@NonNull MppConsumerDetails consumerDetails) {
// Handle success
}
@Override
public void onFailure(@NonNull MppError error) {
// Handle error
}
});
```
### Request Example (Swift)
```swift
MeaPushProvisioning.getConsumerDetails(MeaPushProvisioning.ClickToPay,
paymentNetwork: .visa,
externalConsumerId: externalConsumerId) { details, error in
if let error = error {
// Handle error
} else {
// Handle success
}
}
```
### Request Example (Objective-C)
```objectivec
[MeaPushProvisioning getConsumerDetails:MeaPushProvisioning.ClickToPay
paymentNetwork:PKPaymentNetworkVisa
externalConsumerId:externalConsumerId
completionHandler:^(MppConsumerDetails *_Nullable details, NSError * _Nullable error) {
if (!error) {
// Handle success.
} else {
// Handle error.
}
}];
```
### Request Example (TypeScript)
```typescript
MeaPushProvisioning.getConsumerDetails(MeaPushProvisioning.ClickToPay, MppPaymentNetwork.VISA, externalConsumerId)
.then((data) => {
// Handle success.
})
.catch((error) => {
// Handle error.
})
```
```