Setup SDK

For my2c2p payment, you need private+public key pem file. For make sure , please open your .pem file with text editor and search public and private . If it include both , we can configure the key for iOS.

If you only have private.pem and public.crt , you can merge this two file for iOS pem key.

If you don't have any keys, you can generate with key gen.

Configure Public Key

public key

Configure Private Key

mac app

mac app alert

You will get the encrypted code in your clipboard.

Creating Bridge File For Swift

If you are using Swift, we need to setup Bridge.

Bridge File

Bridge File

In the Bridge.h, add

#import <PGW/PGW.h>

Import Header For Objective-C

Add following code in your .h

#import <PGW/PGW.h>

Initialize my2c2pSDK

....
@property (nonatomic,strong) My2c2pSDK *paymentSDK;
....


paymentSDK = [[My2c2pSDK alloc] initWithPrivateKey:@"PASTE_YOUR_ENCRYPTED_KEY"];
let paymentSDK = My2c2pSDK(privateKey: "PASTE_YOUR_ENCRYPTED_KEY")!

If you want to customize the 2c2p Payment UI, you need to download the CustomUIPaymentFormViewController.xib


App Scheme Declaration (OPTIONAL)

Note : Scheme required for 123 payment : eNETS (Direct Debit/Web Payment)

If you want to use eNETS, please add the scheme as following.

If user want to make payment via Bank (Direct Debit), it will open the Safair instead on in app webview. Without Scheme , safari cannot reopen the app after finish payment.

Note : Scheme required for Alipay

If you want to use Alipay, please add the scheme as following.



Next: New Payment Request (Non-UI)