- Removed UIWebView usage, replaced with WKWebView
- Updated examples
- Added add payment method with cancel transaction functionality (void after authorization)
- Refactored existing code
- Added add payment method example
- Added list payment methods
- Added update payment method
- Added delete payment method
- Updated examples: list, update, delete
- Added Merchant class
- Added OrderDetails class
- Added PayCvvOrderDetails class
- Extended AddCardModel with new constructor(Merchant, OrderDetails, Consumer)
- Added
user_id
flag, used to save card- Updated usage example
- Added support for Customer data
- Updated examples with Customer initialization
- Added extensive logging
- Added optional method
-(void) logTransactionInfo:(NSString *)loggingInfo;
onTransactionLifecycleAdapterDelegate
- Version 1.5.2.rc
- Added BusinessError handling in PgwApi
- BusinessError fields are
nil
if not found (previousNSNull
)- Added BusinessError
- Business errors are now parsed into BusinessError instance with extra fields
transactionId
maskedPan
fullName
cardType
pmAlias
- Error handling now creates BusinessError instance if possible
- Error contains
transaction_id
,full_name
,card_type
,masked_pan
, andlibrary_error = false
- BusinessError will be created- ApiError instance will be created
Module encapsulates basic functionality for payment system.
Add pay.xcodeproj in your application or via cocoa pods.
Overall functionality is shown in flow charts:
Pay module functionality is provided in two classes:
WebtehWebView
classPgwApi
class
To use WebtehWebView
add-card and pay-cvv developer must provide auth_token
issued to merchant. Same case is for PgwApi
.
Auth token is used to authenticate merchant and to decide which payment gateway endpoint will be used (test or production).
Note
: if you do not have auth token please contact [email protected] to receive one.
Include WebtehWebView
in your layout or create dynamically in java code.
Usage example:
- Connect webView from storyboard with outlet
@interface AddCardViewController ()   @property (weak, nonatomic) IBOutlet WebtehWebView *webtehWebView; @end
- Initialize webview and implement
TransactionLifecycleAdapterDelegate
- example.h example.mPgwApi *api = [[PgwApi alloc] init:@"00001111222233330000111122223333" isDebug:true]; NSString *orderNumber = [ApiService currentMillis]; TransactionLifecycleAdapter * adapter = [[TransactionLifecycleAdapter alloc] init:self api:api   merchantKey:@"TestKeyXULLyvgWyPJSwOHe" orderNumber:orderNumber]; [_webtehWebView initialize:adapter isDebug:true timeout:10000];
- Invoke addCard or
AddCardModel *model = [[AddCardModel alloc] init:@"007007007007"   client:@"ios"   orderInfo:@"order info"   orderNumber:orderNumber   sign:@"009"   amount:@"1340"   currency:@"EUR"   clientSecret:@"MegaSecretKey"   authToken:@"00001111222233330000111122223333"]; [_webtehWebView addCard:model];
- invoke payCvv
PayCvvModel *model = [[PayCvvModel alloc] init:@"007007007007"   pmAlias: @"xoAVCN1-4nzfgOP6uKlH6LWgZXYuk7IY4kJ8JxYa"   client:@"cvv_ios"   orderInfo:@"order info"   orderNumber:orderNumber   sign:@"009"   amount:@"1340"   currency:@"EUR"   clientSecret:@"MegaSecretKey"   authToken:@"00001111222233330000111122223333"]; [_webtehWebView payCvv:model];
-AddCard jsonschema
Proxy uses json schemas to validate input received on endpoints. For example this schema is used to validate on /add-card endpoint.
-PayCvv json schema
Proxy uses json schemas to validate input received on endpoints. For example this schema is used to validate on /pay-cvv endpoint.
-TransactionError
-TransactionSuccess
-TransactionErrorDetailed
Usage example - checkOrderId, checkOrder, checkTransaction, getError - example