iOS inApp Integration

Pademobile

inApp payment library:

The library to generate the inApp payment is integrated by a static *.a library and two *.h headers at PadeMobileFrameworkDelegate.h:

libPadeMobileSDK.a
PadeMobileFrameworkDelegate.h
PadeMobileFramework.h

Integration

To add the library to the xcode project you will have to make a configuration within the following section

Build Settings -> Other linker flags agregar "-all_load"

Once the static library is integrated to the project, you will have to include our delegate's header, which will be included ate the moment in which the library is requested in order to have communication between our app and the library, the integration process is the following:

/* Notifies that an OTP is required*/
- (void) requieredOTP;

/* If the return parameter is true, the library will visually notify the error to the user, if it is false the error windows will not be generated and the developer will be in charge of showing the error at the screen */
- (BOOL) autoHandleError: (NSString *) error;

/* Notifies if the transaction was successful or not */
- (void) transactionCompleted: (BOOL) correctly;

@optional
/* Obtains a geographical reference for the country at the main menu */
- (GeoRef *) getGeoReference;

When the protocol is integrated you will have to focus on the library and the payment flow

PadeMobileFramework * padeMobileFramework = [[PadeMobileFramework alloc] initWithDelegate: self] ;
Where self represents the protocol integration class PadeMobileFrameworkDelegate.

By default the library will make the transactions in the development environment, you will have to change it to the production environment.

#ifndef DEBUG
        [padeMobileFramework setSandBox: NO];
#endif

When the process of the transaction is generated you will just have to call the method to be executed where you want the transaction, just as clicking a payment method.

    [padeMobileFramework performeBuyOf: 99.99f  withCurrency:@"Pesos" toIdUser:@"1234" withPublicKey:@"un4114v3pu81ik4" andISOCountry:@"MX"];

Where:

toIdUser: indicates the seller user id.

withPublicKey: indicates the private key given by Pademobile to the seller.

Download

libreria_ios.zip - iOS Library.