From f135638ef28ee9063ee222afa5c86c17dc4cb572 Mon Sep 17 00:00:00 2001 From: shovon0203 Date: Sun, 31 Mar 2019 15:52:49 +0600 Subject: [PATCH 1/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 57596f1..7f5b115 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,4 @@ Tasnim Alam Shovon, shovon54@gmail.com ## License -iPaySDK is available under the MIT license. See the LICENSE file for more info. +iPaySDK is available under the Apache-2.0. See the LICENSE file for more info. From 44026db4e8df2406a4433f1bfd2f3a002e235d3b Mon Sep 17 00:00:00 2001 From: shovon0203 Date: Sun, 31 Mar 2019 17:09:17 +0600 Subject: [PATCH 2/3] Update README.md --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/README.md b/README.md index 7f5b115..82616d7 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ To run the example project, clone the repo, and run `pod install` from the Example directory first. ## Requirements +* iOS 9.3 and Above ## Installation @@ -18,6 +19,44 @@ it, simply add the following line to your Podfile: pod 'iPaySDK' ``` +## How to use +Setup Configuration and Initialization +``` +iPaySDK.shared.environment = .Development //Use this for Development environment +iPaySDK.shared.configure(withClientId: "xyz") +iPaySDK.shared.delegate = self +``` + +Initiate Session + +``` +iPaySDK.shared.userInitiateSession() +``` + +Get Balance + +``` +iPaySDK.shared.getBalance { (balance) in + DispatchQueue.main.async { + print(balance) + } +} +``` + +Make Payment +``` +iPaySDK.shared.makePayment(amount: 10) +``` + +SDK Delegate: Use these delegate to handle callbacks and show appropriate results to improve user experience. +``` +func oauthDidSuccess() +func oauthDidFail() + +func paymentDidSuccess() +func paymentDidFail() +``` + ## Author Tasnim Alam Shovon, shovon54@gmail.com From fc56841830530ce3f342a83259ed92aacad1d51b Mon Sep 17 00:00:00 2001 From: shovon0203 Date: Wed, 3 Apr 2019 12:38:03 +0600 Subject: [PATCH 3/3] Update README.md --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index 82616d7..6ce618c 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,23 @@ it, simply add the following line to your Podfile: pod 'iPaySDK' ``` +## Prerequisite +iPaySDK requires merchant to obtain the `client_id` from iPay. If your `client_id` is `xyz` then you need to add the following URL Type in your info.plist + +``` + CFBundleURLTypes + + + CFBundleTypeRole + None + CFBundleURLSchemes + + ipayxyz + + + +``` + ## How to use Setup Configuration and Initialization ``` @@ -33,6 +50,16 @@ Initiate Session iPaySDK.shared.userInitiateSession() ``` +Add URL Handler + +Place this code in AppDelegate +``` +func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { + return iPaySDK.shared.handleUrl(url: url) +} +``` + + Get Balance ``` @@ -48,6 +75,14 @@ Make Payment iPaySDK.shared.makePayment(amount: 10) ``` +Check Whether SDK is already connected +``` +if iPaySDK.shared.isAuthenticated { + //Write your code here +} +``` + + SDK Delegate: Use these delegate to handle callbacks and show appropriate results to improve user experience. ``` func oauthDidSuccess()