AppotaPayment

Inherits from: NSObject
Declared in: AppotaPayment.h

General

AppotaPayment is the class that implements all main features of Payment SDK. This class provides functions calling to payment interfaces for each various methods.

Properties

BOOL isSandBoxMode Select turn on/off sandbox mode for application
NSString *clientID ClientID code for application provided by Appota system
NSString *clientSecret Series of clientSecret for application provided by Appota system
NSString *sandboxKey Series of sandboxKey for application provided by Appota system
NSString *inappKey Series of inappKey for application provided by Appota system
BOOL debugMode Select turn on/off debug mode

Definition Type

AppotaPaymentHandler

Conveyed when calling payment methods to receive data after constructing process of a transaction ends.

typedef void(^AppotaPaymentHandler)(NSDictionary *apiDict, AppotaPaymentState status, NSError *error);

AppotaPaymentState

Values of transaction status returned when constructing process of a transaction ends.

typedef enum {
    AppotaPaymentSucceed = 1,
    AppotaPaymentFailed = 0,
    AppotaPaymentSMSPending = 2,
    AppotaPaymentSMSCanceled = 3,
    AppotaPaymentSMSInValidAmount = 4,
    AppotaPaymentClosed = 5,
    AppotaPaymentCardInvalid = 6,
    AppotaPaymentInvalidAmount = 7,
    AppotaGetListSMSError = 11,
    AppotaPaymentWrongFormatResponse = 12,
} AppotaPaymentState;

Methods

void makeSMSPaymentWithAmount:(int) amount withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withCompletionHandler:(AppotaPaymentHandler) handler
Display payment interface using SMS method with a given price.
void makeSMSPaymentWithListAmount:(NSArray*) listAmount withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler
Display payment interface using SMS method with a list of given prices.
void makeSMSPaymentWithState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler
Get SMS structures from system (for those applications design payment interface themselves, do not use displayed interface of Appota SDK).
void makePaypalPaymentWithAmount:(float) amount withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withCompletionHandler:(AppotaPaymentHandler) handler
Display payment interface using Paypal method with a given price.
void makePaypalPaymentWithListAmount:(NSArray*) listAmount withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler
Display payment interface using Paypal method with a list of given prices.
void makePaypalPaymentWithState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler
Display payment interface using Paypal method that allows user to add the amount of money.
void makeCardPaymentWithCardCode:(NSString *)cardCode withCardSerial:(NSString *)cardSerial withCardVendor:(NSString *)cardVendor withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withCompletionHandler:(AppotaPaymentHandler) handler
Payment by direct Card (for those applications design payment interface themselves, do not use displayed interface of Appota SDK).
void makeCardPaymentWithState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler
Display payment interface using Card method.
void makeBankPaymentWithAmount:(float) amount withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withCompletionHandler:(AppotaPaymentHandler) handler
Display payment interface using Internet Banking with a given price.
void makeBankPaymentWithListAmount:(NSArray*) listAmount withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler
Display payment interface using Internet Banking with a list of given prices.
void makeBankPaymentWithState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler
Display payment interface using Internet Banking that allows users to add the amount of money.
void makeApplePaymentWithItem:(AppotaAppleIAPItem*) item withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler
Display payment interface using Apple Payment method with a given IAP item.
void makeApplePaymentWithListItem:(NSArray*) lisItem withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler
Display payment interface using Apple Payment method with a list of given IAP items.
void checkTransactionInAppWithID:(NSString *)inApp_id withCompletionHandler:(AppotaResultHandler) handler
void checkUpdate

 

(void) makeSMSPaymentWithAmount:(int) amount withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withCompletionHandler:(AppotaPaymentHandler) handler

Display payment interface using SMS method with a given price.

Parameters:

- amount: value of each SMS
- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- handler: Handler called when constructing transaction ends

(void) makeSMSPaymentWithListAmount:(NSArray*) listAmount withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler

Display payment interface using SMS method with a list of given prices.

Parameters:

- listAmount: A list of SMS value
- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- description: Decribe payment specifically
- handler: Handler called when constructing transaction ends

(void) makeSMSPaymentWithState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler

Get SMS structures from system (for those applications design payment interface themselves, do not use displayed interface of Appota SDK).

Parameters:

- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- description: Decribe payment specifically
- handler: Handler called when constructing transaction ends

(void) makePaypalPaymentWithAmount:(float) amount withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withCompletionHandler:(AppotaPaymentHandler) handler

Display payment interface using Paypal method with a given price.

Parameters:

- amount: value of each SMS
- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- handler: Handler called when constructing transaction ends

(void) makePaypalPaymentWithListAmount:(NSArray*) listAmount withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler

Display payment interface using Paypal method with a list of given prices.

Parameters:

- listAmount: List of value to charge
- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- description: Decribe payment specifically
- handler: Handler called when constructing transaction ends

(void) makePaypalPaymentWithState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler

Display payment interface using Paypal method that allows user to add the amount of money.

Parameters:

- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- description: Decribe payment specifically
- handler: Handler called when constructing transaction ends

(void) makeCardPaymentWithCardCode:(NSString *)cardCode withCardSerial:(NSString *)cardSerial withCardVendor:(NSString *)cardVendor withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withCompletionHandler:(AppotaPaymentHandler) handler

Payment by direct Card (for those applications design payment interface themselves, do not use displayed interface of Appota SDK).

Parameters:

- cardCode: Card Code Number
- cardSerial: Serial Number
- cardVendor: Vendors. Now supporting:
        vinaphone: Vinaphone Card
        mobifone:  Mobifone Card
        viettel:       Viettel Card
        fpt:            FPT Gate Card
        mega:        MegaCard  
- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- handler: Handler called when constructing transaction ends

(void) makeCardPaymentWithState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler

Display payment interface using Card method.

Parameters:

- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- description: Decribe payment specifically
- handler: Handler called when constructing transaction ends

(void) makeBankPaymentWithAmount:(float) amount withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withCompletionHandler:(AppotaPaymentHandler) handler

Display payment interface using Internet Banking with a given price.

Parameters:

- amount: Value to charge
- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- handler: Handler called when constructing transaction ends

(void) makeBankPaymentWithListAmount:(NSArray*) listAmount withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler

Display payment interface using Internet Banking with a list of given prices.

Parameters:

- listAmount: A list of value to charge
- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- description: Decribe payment specifically
- handler: Handler called when constructing transaction ends

(void) makeBankPaymentWithState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler

Display payment interface using Internet Banking that allows users to add the amount of money.

Parameters:

- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- description: Decribe payment specifically
- handler: Handler called when constructing transaction ends

(void) makeApplePaymentWithItem:(AppotaAppleIAPItem*) item withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler

Display payment interface using Apple Payment method with a given IAP item.

Parameters:

- items: IAP Item
- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- description: Decribe payment specifically
- handler: Handler called when constructing transaction ends

(void) makeApplePaymentWithListItem:(NSArray*) lisItem withState:(NSString*) state withTarget:(NSString*) target withNoticeUrl:(NSString*) noticeUrl withDescription:(NSString*) description withCompletionHandler:(AppotaPaymentHandler) handler

Display payment interface using Apple Payment method with a list of given IAP items.

Parameters:

- item: List of IAP items
- state: A seri of customized states for dev to send to
- target: A seri of customized targets for dev to send to
- noticeUrl: URL called when transaction ends
- description: Decribe payment specifically
- handler: Handler called when constructing transaction ends