User Tools

Site Tools


developer:ios

Axia ePay-iOS Library v1.0 Overview

The Axia ePay-iOS library allows developers to implement our payment gateway within their iOS apps (iPhone & iPad). The library is designed to give developers the tools necessary to create a highly customized payment applications. Developers can choose to use our pre-made “UIView” that contains all the necessary credit card payment fields, or creating their own credit card payment UIView.

The library supports iOS 7.0+.

How To Get Started

The Axia ePay Library contains two example projects and the Library itself. To obtain the library along with a getting started guide, please email devsupport@axiaepay.com

Once you added the library into the project. Use this code snippet to get started.

#import "iPhoneViewController.h"
#import "Constants.h"
 
@implementation iPhoneViewController
 
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}
 
- (void)viewDidLoad
{
    [super viewDidLoad];
 
    Constants *shareManager = [Constants sharedManager];
 
    /*
     * This are the required information, which need to initialize
     * Before doing any transactions
     */
    shareManager.isProduction = true;
    shareManager.sourceKey = @"253idtPXb6aXvaX3LdSM1SDLIn12ARCI";
    shareManager.pinNum = @"1234";
 
 
}

How To Get Started

What is Apple Pay?

Apple pay allows you to securely accept and process payment from customers with iPhone 6 and iPhone 6+. User can buy physical goods and services in your app. Using Touch ID, users can authorize payments using credit and debit card payment that are stored on iPhone 6 and iPhone 6 plus.

How does Apple Pay transaction work?

Each time a transaction occurs, apple pay generates a token for the transaction. The token contains all the required information to do payment processing. The customer doesn’t have to enter their credit information because Apple Pay will pass the tokenized card information to our gateway.

What is the cost to use Apple Pay?

There is no cost to it. It is included with your USAePay account.

How to use Apple Pay with our library?

Download our USAePayLibrary. Add it into your project, then simply pass the PKPaymentToken into our method.

Example:

- (void)handlesApplePay
{
   CreditCardPayment *ccPayment = [[CreditCardPayment alloc]init];
 
   /*
    * paymentTokenData: This is the paymentData from PKPaymentToken
    * invoiceNumber: This is your custom invoice number
    */
   [ccPayment processApplePay:paymentTokenData :invoiceNumber];
 
}
 
 
/*
 * This delegate method gets call when the payment is finished processing
 * It will return the processing result regarding to the transaction
 * Such ass Approved, failed, error and etc..
 * response.Result is one of the property, please go to uesoapTransactionResponse.h 
 * For a list of all the available properties
 */
-(void)finishProcessingPayment :(uesoapTransactionResponse *)response
{
    NSLog(@"Credit Card Status: %@", response.Result);
}

CreditCardPayment Methods

Method Description Link
verifyCreditCard Verify credit card number http://wiki.axiaepay.com/developer/ios-verifycc
checkExpDate Verify credit card expiration date http://wiki.axiaepay.com/developer/ios-checkexpdate
processCCPayment Process credit card payment http://wiki.axiaepay.com/developer/ios-processccpayment
finishProcessingPayment Delegate method, when payment is finished processing http://wiki.axiaepay.com/developer/ios-finishprocessccpayment

ueConnection Methods

Method Description Link
isConnected Checks for internet connection http://wiki.axiaepay.com/developer/ios-checkconnection
developer/ios.txt · Last modified: 2014/09/24 23:51 (external edit)