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 (support@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
<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>com.miura.shuttle</string>
</array>
Sample Code¶
Implement protocol PNEReaderPresenter
- (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
PNEReaderFactory *factory = [[PNEReaderFactory alloc] init];
PNEReaderInfo *reader = [PNEReaderInfo infoWithType:PNEReaderType_MIURA];
// Note: manager must be a property or a field or a static local variable, to prevent an elimination
manager = [factory createManager:reader
amount:[NSDecimalNumber decimalNumberWithString:@"1.00"]
currency:@"RUB"
presenter:self];
[manager start];