Skip to content
Permalink
Browse files

Updated Readme.md - Added usage instructions

  • Loading branch information...
VihlayewAlex committed Mar 15, 2019
1 parent 44a25e5 commit efea1dd99193f5ad04ba73cf435d0bf0071fb0d8
Showing with 20 additions and 2 deletions.
  1. +20 −2 Readme.md
@@ -16,7 +16,7 @@ xBit iOS payments library

## Requirements

- iOS 8.0+
- iOS 9.0+
- Xcode 10.0+

## Installation
@@ -35,7 +35,7 @@ To integrate xBit_iOS_SDK into your Xcode project using CocoaPods, specify it in

```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
platform :ios, '9.0'
use_frameworks!
pod 'xBit_iOS_SDK', '~> 0.0.1'
@@ -145,6 +145,24 @@ $ git submodule update --init --recursive

## Usage

To initiate a payment, you need to import library and call it's method this way to get a payment ViewController. After that you should present it:

``` swift
import xBit_iOS_SDK
let paymentVC = XPayment.paymentViewControllerWith(
apiKey: "YOUR API KEY",
apiSecret: "YOUR API SECRET",
amount: "5.0", // Amount of xBits to pay
orderId: "123", // Id of the order to pay for
callbackBaseUrlString: "https://google.com/") // Url of the service that will handle your payment
present(paymentVC, animated: true, completion: nil)
```

Example project is available at /xBit_iOS_SDK_Test folder of the repository. To test it, clone repository and open xBit_iOS_SDK.xcworkspace file

## Contributing

Issues and pull requests are welcome!

0 comments on commit efea1dd

Please sign in to comment.
You can’t perform that action at this time.