4.2. mPOS SDK for iOS
Introduction
Denumtech mPOS SDK is a mobile payment software & hardware package that allows to quickly and easily start offering a mobile payment service. Usage of an affordable mobile point of sale (mPOS) terminal allows Connecting party to extend their business with in-person non-cash payments.
PayneteasyReader SDK provides fast, ADVT & M-TIP compliant integration with mPOS terminals in mobile apps. SDK includes header files and a single static library.
Supported Terminals
Vendor |
Model |
Connectivity |
---|---|---|
Miura |
M006, M007, M010 |
Bluetooth, USB, Wi-Fi |
Spire |
SPm2, SPm20 |
Bluetooth |
Verifone |
Vx820 |
Ethernet, USB, RS232 |
PAX |
SP30, D200 |
Ethernet, USB, RS232 |
Note
Integration
Add the SDK to the project
Add the following to Podfile:
pod "PayneteasyReader", :git => 'git@github.com:evsinev/PayneteasyReader.git', :tag => '$VERSION'
Please change $VERSION to the latest version from releases list for IOS or Android respectively.
For Miura, Spire and Pax
Add the following to *-Info.plist:
<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>com.miura.shuttle</string>
<string>com.thyron</string>
<string>com.paxsz.ipos</string>
</array>
Sample Code
Implement the PNEReaderPresenter protocol:
- (void)stateChanged:(PNEReaderEvent *)aEvent {
// displays reader status
// see an example at https://github.com/payneteasy/ReaderExample/blob/master/ReaderExample/PaymentModule/PaymentPresenter.m#L69
}
- (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 the error
// see an example at https://github.com/payneteasy/ReaderExample/blob/master/ReaderExample/PaymentModule/PaymentPresenter.m#L93
}
- (void)onProcessingEvent:(PNEProcessingEvent *)aEvent {
// wait for Result event
// see an example at https://github.com/payneteasy/ReaderExample/blob/master/ReaderExample/PaymentModule/PaymentPresenter.m#L96
}
- (PNEConfigurationContinuation *)onConfiguration {
return [[PNEConfigurationContinuation alloc]
initWithBaseUrl:@"https://paynet-qa.clubber.me/paynet/rki"
merchantLogin:_payment.merchantLogin
merchantKey:_payment.merchantKey
merchantEndPointId:_payment.merchantEndPointId
merchantName:_payment.merchantName
];
}
Start Reader Manager:
PNEReaderFactory *factory = [[PNEReaderFactory alloc] init];
PNEReaderInfo *reader = [PNEReaderInfo infoWithType:PNEReaderType_MIURA_OR_SPIRE];
// 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];
Useful Links
Additional samples can be provided by request.
Other releases can be found here.
Test Environment
Amount |
Status |
Stage |
---|---|---|
1.00 |
APPROVED |
Purchase, Final Advice |
2.00 |
DECLINED |
Purchase |
3.00 |
APPROVED |
Purchase |
4.00 |
DECLINED |
Purchase, Final Advice |
1000.01 |
APPROVED |
Purchase, Final Advice with PIN Online Test. Only test cards can be used in test purposes. |
Note