Skip to content

Commit

Permalink
Added readme content
Browse files Browse the repository at this point in the history
  • Loading branch information
evsinev committed Aug 16, 2014
1 parent 2a630b4 commit 693a8f8
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions README.md
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];
```

0 comments on commit 693a8f8

Please sign in to comment.