IdramMerchantPayment 0.1.0

IdramMerchantPayment 0.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Feb 2017

Maintained by Gagik Martirosyan.



  • By
  • Gagik Martirosyan

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

Manual installation

You can simply download IdramPaymentManager.h and IdramPaymentManager.m and Drag & Drop to your project.

Usage

  1. After setting up dependencies import header #import "IdramPaymentManager.h"
  2. In your Info.plist file add following:
<key>LSApplicationQueriesSchemes</key>
 <array>
   <string>idramapp</string>
 </array>
  1. If you need to open your application you need to set up 'URL Types' in your Info.plist. See http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
  2. Also implement handleOpenURL method in your appDelegate.m to handle success or failure callbacks from Idram app.

Documentation

Currently 'IdramPaymentManager' has single class method:

    [IdramPaymentManager payWithReceiverName:@"Some name"
                                  receiverId:@"Users Idram Id. (EDP_REC_ACCOUNT)"
                                       title:@"Unique id for payment identification of merchant billing. (EDP_BILL_NO)"
                                      amount:@"10000"
                                      hasTip:YES
                           callbackURLScheme:@"Your URL Scheme"];

Callback

<your URL Scheme>://payment/idram?error=<0 for success or error code>&receiverId=<id>&tip=<tip amount>

Error codes

  1. 0 -> Unknown error
  2. 110099 -> Operation is canceled by user
  3. 110012 -> Idram ID recipient does not exist or is blocked.
  4. 110043 -> The service is currently unavailable. Please, try again later.

Other errors are handled by Idram application

Author

Gagik Martirosyan, [email protected]

License

IdramMerchantPayment is available under the MIT license. See the LICENSE file for more info.