Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shovon0203 authored Apr 3, 2019
1 parent 44026db commit fc56841
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>None</string>
<key>CFBundleURLSchemes</key>
<array>
<string>ipayxyz</string>
</array>
</dict>
</array>
```

## How to use
Setup Configuration and Initialization
```
Expand All @@ -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

```
Expand All @@ -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()
Expand Down

0 comments on commit fc56841

Please sign in to comment.