-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
PaynetEasyReader SDK for iOS | ||
============================ | ||
|
||
PaynetEasyReader SDK provides fast, easy integration with mPOS readers in mobile apps. | ||
|
||
Instructions | ||
------------ | ||
|
||
The PaynetEasyReader SDK includes header files and a single static library. We'll walk you through integration and usage. | ||
|
||
### Sign up for | ||
|
||
* You'll need to contact to payneteasy.com for merchant login. | ||
|
||
|
||
### Requirements | ||
|
||
* Supports target deployment of iOS version 7.0+ and instruction set armv7+ (including 64-bit), x86_64, i386 (for emulator). | ||
|
||
### Setup | ||
|
||
Add to your Podfile | ||
``` | ||
pod "PaynetEasyReader", :git => 'git@github.com:evsinev/PaynetEasyReader.git' | ||
``` | ||
|
||
### For Miura Shuttle | ||
|
||
Add to your *-Info.plist | ||
```xml | ||
<key>UISupportedExternalAccessoryProtocols</key> | ||
<array> | ||
<string>com.miura.shuttle</string> | ||
</array> | ||
``` | ||
|
||
### Sample Code | ||
|
||
Implement protocol PNEReaderPresenter | ||
```obj-c | ||
|
||
- (void)stateChanged:(PNEReaderEvent *)aEvent { | ||
// displays reader status | ||
} | ||
|
||
- (PNEProcessingContinuation *)onCard:(PNECard *)aCard { | ||
// provide payneteasy.com account info | ||
PNEProcessingContinuation * continuation = [PNEProcessingContinuation | ||
continuationWithBaseUrl:@"https://sandbox.payneteasy.com/paynet" | ||
merchantLogin:MERCHANT_LOGIN | ||
merchantKey:MERCHANT_KEY | ||
merchantEndPointId:END_POINT_ID | ||
orderInvoiceNumber:[[NSUUID UUID] UUIDString]]; | ||
|
||
return continuation; | ||
} | ||
|
||
- (void)onCardError:(PNECardError *)aError { | ||
// deal with errors | ||
} | ||
|
||
- (void)onProcessingEvent:(PNEProcessingEvent *)aEvent { | ||
// wait for Result event | ||
} | ||
|
||
``` | ||
|
||
Starts Reader Manager | ||
|
||
```obj-c | ||
PNEReaderFactory *factory = [[PNEReaderFactory alloc] init]; | ||
PNEReaderInfo *reader = [PNEReaderInfo infoWithType:PNEReaderType_MIURA]; | ||
manager = [factory createManager:reader | ||
amount:[NSDecimalNumber decimalNumberWithString:@"1.00"] | ||
currency:@"RUB" | ||
presenter:self]; | ||
[manager start]; | ||
``` | ||