bleumi_pay_sdk_ruby 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -7
- data/bleumi_pay_sdk_ruby.gemspec +3 -3
- data/docs/AlgorandBalance.md +27 -0
- data/docs/BadRequest.md +1 -1
- data/docs/Chain.md +4 -3
- data/docs/CheckoutToken.md +6 -3
- data/docs/CreateCheckoutUrlRequest.md +7 -7
- data/docs/CreatePaymentRequest.md +3 -3
- data/docs/CreatePaymentResponse.md +1 -1
- data/docs/CreatePayoutRequest.md +1 -1
- data/docs/CreatePayoutResponse.md +1 -1
- data/docs/EthereumBalance.md +29 -0
- data/docs/HostedCheckoutsApi.md +26 -12
- data/docs/PaginatedPaymentOperations.md +2 -3
- data/docs/PaginatedPayments.md +3 -3
- data/docs/PaginatedPayoutItems.md +1 -1
- data/docs/Payment.md +0 -1
- data/docs/PaymentAddresses.md +2 -1
- data/docs/PaymentBalances.md +2 -1
- data/docs/PaymentOperation.md +2 -2
- data/docs/PaymentOperationInputs.md +4 -4
- data/docs/PaymentRefundRequest.md +1 -2
- data/docs/PaymentSettleRequest.md +1 -1
- data/docs/PaymentsApi.md +17 -15
- data/docs/Payout.md +2 -1
- data/docs/PayoutItem.md +1 -1
- data/docs/PayoutItemInputs.md +1 -1
- data/docs/PayoutsApi.md +10 -10
- data/docs/ValidateCheckoutRequest.md +1 -1
- data/docs/WalletAddress.md +1 -0
- data/docs/WalletBalance.md +1 -1
- data/lib/bleumi_pay_sdk_ruby.rb +5 -5
- data/lib/bleumi_pay_sdk_ruby/api/hosted_checkouts_api.rb +17 -5
- data/lib/bleumi_pay_sdk_ruby/api/payments_api.rb +46 -17
- data/lib/bleumi_pay_sdk_ruby/api/payouts_api.rb +14 -6
- data/lib/bleumi_pay_sdk_ruby/api/request_validator.rb +264 -0
- data/lib/bleumi_pay_sdk_ruby/api_client.rb +3 -3
- data/lib/bleumi_pay_sdk_ruby/api_error.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/configuration.rb +3 -3
- data/lib/bleumi_pay_sdk_ruby/models/{token.rb → algorand_balance.rb} +43 -38
- data/lib/bleumi_pay_sdk_ruby/models/bad_request.rb +3 -3
- data/lib/bleumi_pay_sdk_ruby/models/chain.rb +4 -5
- data/lib/bleumi_pay_sdk_ruby/models/checkout_token.rb +28 -13
- data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_request.rb +19 -7
- data/lib/bleumi_pay_sdk_ruby/models/create_checkout_url_response.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/create_payment_request.rb +17 -5
- data/lib/bleumi_pay_sdk_ruby/models/create_payment_response.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/create_payout_request.rb +4 -3
- data/lib/bleumi_pay_sdk_ruby/models/create_payout_response.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/{network_balance.rb → ethereum_balance.rb} +13 -46
- data/lib/bleumi_pay_sdk_ruby/models/paginated_payment_operations.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/paginated_payments.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/paginated_payout_items.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/payment.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/payment_addresses.rb +17 -6
- data/lib/bleumi_pay_sdk_ruby/models/payment_balances.rb +15 -6
- data/lib/bleumi_pay_sdk_ruby/models/payment_operation.rb +4 -3
- data/lib/bleumi_pay_sdk_ruby/models/payment_operation_inputs.rb +3 -3
- data/lib/bleumi_pay_sdk_ruby/models/payment_operation_response.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/payment_refund_request.rb +3 -3
- data/lib/bleumi_pay_sdk_ruby/models/payment_settle_request.rb +3 -3
- data/lib/bleumi_pay_sdk_ruby/models/payout.rb +16 -6
- data/lib/bleumi_pay_sdk_ruby/models/payout_item.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/payout_item_inputs.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/validate_checkout_request.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/validate_checkout_response.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/wallet_address.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/models/wallet_balance.rb +2 -2
- data/lib/bleumi_pay_sdk_ruby/version.rb +3 -3
- data/py_create.rb +38 -0
- data/spec/api/payments_api_spec.rb +2 -2
- data/spec/models/algorand_balance_spec.rb +47 -0
- data/spec/models/ethereum_balance_spec.rb +59 -0
- metadata +14 -10
- data/docs/EthAddress.md +0 -13
- data/docs/NetworkBalance.md +0 -29
- data/docs/Token.md +0 -15
- data/lib/bleumi_pay_sdk_ruby/models/eth_address.rb +0 -208
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df66597183308a5e8db2403cc46d9b99e3cd6c7ee4c152559bec829be7e03f12
|
4
|
+
data.tar.gz: 5dee66c56de52ff9314a3e8d5fcabd03b2284a7dcc1241ae6399895e5302d8ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 800fc069330aabb76b0295f2f278da76e573b780263637566fe6ed2f388bf8217a611818647400307fcaca948f68d34fdf8e52cedd54bc2648d570626832bc81
|
7
|
+
data.tar.gz: 2a1ca5c7dbe3281fc55308ed0041fe5c18e35996319fb86c94be84a4b22e5891592562caf6402783758225a837c8078bba7f69a8ba4c8261b1992d2a294419d9
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/bleumi/bleumi-pay-sdk-ruby/master/LICENSE)
|
6
6
|
|
7
|
-
The Bleumi Pay SDK is a one-stop shop to help you integrate
|
7
|
+
The Bleumi Pay SDK is a one-stop shop to help you integrate Algorand, Ethereum, ERC-20 and xDai payments and/or payouts into your business or application. The SDK bundles [Bleumi Pay API](https://pay.bleumi.com/docs/#introduction) into one SDK to ease implementation and support.
|
8
8
|
|
9
9
|
bleumi-pay-sdk-ruby is a Ruby library that provides an interface between your Rubu=y application and [Bleumi Pay API](https://pay.bleumi.com/docs/#introduction). This tutorial covers the basics, including examples, needed to use the SDK.
|
10
10
|
|
@@ -53,14 +53,14 @@ end
|
|
53
53
|
api_instance = BleumiPay::PayoutsApi.new
|
54
54
|
create_payment_request = BleumiPay::CreatePaymentRequest.new # CreatePaymentRequest |
|
55
55
|
opts = {
|
56
|
-
chain: BleumiPay::Chain
|
56
|
+
chain: BleumiPay::Chain::GOERLI # Chain | Network in which payment is to be created. Please refer documentation for Supported Networks
|
57
57
|
}
|
58
58
|
|
59
59
|
begin
|
60
60
|
|
61
61
|
create_payment_request.id = '<ID>'
|
62
|
-
create_payment_request.buyer_address =
|
63
|
-
create_payment_request.transfer_address =
|
62
|
+
create_payment_request.buyer_address = '<BUYER_ADDR>' # Replace <BUYER_ADDR> with the Buyer's Network Address
|
63
|
+
create_payment_request.transfer_address = '<MERCHANT_ADDR>' # Replace <MERCHANT_ADDR> with the Merchant's Network Address
|
64
64
|
|
65
65
|
#Create a payout.
|
66
66
|
result = api_instance.create_payment(create_payment_request, opts)
|
@@ -92,6 +92,7 @@ BleumiPay::PayoutsApi | [**create_payout**](docs/PayoutsApi.md#create_payout) |
|
|
92
92
|
|
93
93
|
## Documentation for Models
|
94
94
|
|
95
|
+
- [BleumiPay::AlgorandBalance](docs/AlgorandBalance.md)
|
95
96
|
- [BleumiPay::BadRequest](docs/BadRequest.md)
|
96
97
|
- [BleumiPay::Chain](docs/Chain.md)
|
97
98
|
- [BleumiPay::CheckoutToken](docs/CheckoutToken.md)
|
@@ -101,8 +102,7 @@ BleumiPay::PayoutsApi | [**create_payout**](docs/PayoutsApi.md#create_payout) |
|
|
101
102
|
- [BleumiPay::CreatePaymentResponse](docs/CreatePaymentResponse.md)
|
102
103
|
- [BleumiPay::CreatePayoutRequest](docs/CreatePayoutRequest.md)
|
103
104
|
- [BleumiPay::CreatePayoutResponse](docs/CreatePayoutResponse.md)
|
104
|
-
- [BleumiPay::
|
105
|
-
- [BleumiPay::NetworkBalance](docs/NetworkBalance.md)
|
105
|
+
- [BleumiPay::EthereumBalance](docs/EthereumBalance.md)
|
106
106
|
- [BleumiPay::PaginatedPaymentOperations](docs/PaginatedPaymentOperations.md)
|
107
107
|
- [BleumiPay::PaginatedPayments](docs/PaginatedPayments.md)
|
108
108
|
- [BleumiPay::PaginatedPayoutItems](docs/PaginatedPayoutItems.md)
|
@@ -117,7 +117,6 @@ BleumiPay::PayoutsApi | [**create_payout**](docs/PayoutsApi.md#create_payout) |
|
|
117
117
|
- [BleumiPay::Payout](docs/Payout.md)
|
118
118
|
- [BleumiPay::PayoutItem](docs/PayoutItem.md)
|
119
119
|
- [BleumiPay::PayoutItemInputs](docs/PayoutItemInputs.md)
|
120
|
-
- [BleumiPay::Token](docs/Token.md)
|
121
120
|
- [BleumiPay::ValidateCheckoutRequest](docs/ValidateCheckoutRequest.md)
|
122
121
|
- [BleumiPay::ValidateCheckoutResponse](docs/ValidateCheckoutResponse.md)
|
123
122
|
- [BleumiPay::WalletAddress](docs/WalletAddress.md)
|
data/bleumi_pay_sdk_ruby.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
3
|
=begin
|
4
|
-
#Bleumi Pay API
|
4
|
+
#Bleumi Pay REST API
|
5
5
|
|
6
|
-
#A simple and powerful REST API to integrate
|
6
|
+
#A simple and powerful REST API to integrate Algorand, Ethereum, ERC-20 and xDai payments and/or payouts into your business or application
|
7
7
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
9
9
|
Contact: info@bleumi.com
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.email = ["info@bleumi.com"]
|
24
24
|
s.homepage = "https://pay.bleumi.com/"
|
25
25
|
s.summary = "Bleumi Pay API Ruby Gem"
|
26
|
-
s.description = "A simple and powerful REST API to integrate
|
26
|
+
s.description = "A simple and powerful REST API to integrate Algorand, Ethereum, ERC-20 and xDai payments into your business or application"
|
27
27
|
s.license = "MIT"
|
28
28
|
s.required_ruby_version = ">= 1.9"
|
29
29
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# BleumiPay::AlgorandBalance
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**alg_mainnet** <br>(Optional)| [**Hash<String, WalletBalance>**](WalletBalance.md) | A dictionary which gives the Wallet balances in each Algorand MainNet |
|
8
|
+
**alg_testnet** <br>(Optional)| [**Hash<String, WalletBalance>**](WalletBalance.md) | A dictionary which gives the Wallet balances in each Algorand TestNet |
|
9
|
+
|
10
|
+
## Example - Algorand TestNet
|
11
|
+
|
12
|
+
```json
|
13
|
+
{
|
14
|
+
"balances": {
|
15
|
+
"algorand": {
|
16
|
+
"alg_testnet": {
|
17
|
+
"ALGO": {
|
18
|
+
"blockNum": "4457461",
|
19
|
+
"token_balance": "10000000",
|
20
|
+
"balance": "10",
|
21
|
+
"token_decimals": 6
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
```
|
data/docs/BadRequest.md
CHANGED
@@ -4,6 +4,6 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**error_code** | **String** | Code for error class. Complete list of error codes is available
|
7
|
+
**error_code** | **String** | Code for error class. Complete list of error codes is available here. |
|
8
8
|
**error_message** | **String** | Error description | [optional]
|
9
9
|
|
data/docs/Chain.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# BleumiPay::Chain
|
2
2
|
|
3
|
+
Network enumeration. Please refer to the [Supported Networks](https://pay.bleumi.com/docs/#supported-networks).
|
4
|
+
|
3
5
|
## Enum
|
4
6
|
|
5
7
|
* `MAINNET` (value: `"mainnet"`)
|
6
|
-
* `ROPSTEN` (value: `"ropsten"`)
|
7
8
|
* `GOERLI` (value: `"goerli"`)
|
8
|
-
* `KOVAN` (value: `"kovan"`)
|
9
|
-
* `RINKEBY` (value: `"rinkeby"`)
|
10
9
|
* `XDAI` (value: `"xdai"`)
|
11
10
|
* `XDAI_TESTNET` (value: `"xdai_testnet"`)
|
11
|
+
* `ALG_MAINNET` (value: `"alg_mainnet"`)
|
12
|
+
* `ALG_TESTNET` (value: `"alg_testnet"`)
|
data/docs/CheckoutToken.md
CHANGED
@@ -4,17 +4,20 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
+
**network** | **String** | The network in which the token is defined |
|
7
8
|
**chain** | **String** | The chain in which the token is defined |
|
8
|
-
**
|
9
|
+
**addr** | **String** | The address of the token |
|
9
10
|
**name** | **String** | Name of the token |
|
10
11
|
**symbol** | **String** | Symbol of the token |
|
11
|
-
**decimals** | **
|
12
|
+
**decimals** | **Integer** | Token decimal places |
|
13
|
+
|
12
14
|
|
13
15
|
## Example
|
14
16
|
|
15
17
|
```json
|
16
18
|
{
|
17
|
-
"
|
19
|
+
"network": "ethereum",
|
20
|
+
"chain": "goerli",
|
18
21
|
"transferAddress": "0xd15bdd17175825742a5904b21008dd3a019a060e",
|
19
22
|
"name": "USD p18",
|
20
23
|
"symbol": "USD18",
|
@@ -4,15 +4,15 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**id** | **String** | Unique identifier for this payment. <br> <b>Warning!</b> - Do not reuse this id with the [Create a Payment](
|
7
|
+
**id** | **String** | Unique identifier for this payment. <br> <b>Warning!</b> - Do not reuse this id with the [Create a Payment](https://pay.bleumi.com/docs/#create-a-payment) endpoint. |
|
8
8
|
**currency** | **String** | Currency Code<br><br> When you configure custom tokens for the Hosted Checkout in your account in the <a href="https://pay.bleumi.com/app/" target="_blank">Bleumi Pay Dashboard</a>, please use:<br> - ISO 4217 Alphabetic Code for fiat, gold, silver, etc.<br> - Token Symbol for crypto |
|
9
9
|
**amount** | **String** | Token amount for this payment |
|
10
10
|
**cancel_url** | **String** | Buyer will be redirected to this URL upon canceling the payment. |
|
11
|
-
**success_url** | **String** | Buyer will be redirected to this URL upon successfully completing the payment and the following data is passed as GET parameters, <ul style="font-weight: 500"><li><b>id</b> - Unique identifier of the checkout URL</li><li><b>
|
12
|
-
**
|
13
|
-
|
14
|
-
**token
|
15
|
-
**
|
11
|
+
**success_url** | **String** | Buyer will be redirected to this URL upon successfully completing the payment and the following data is passed as GET parameters, <ul style="font-weight: 500"><li><b>id</b> - Unique identifier of the checkout URL</li><li><b>hmac_input</b> - Payment parameters used to generate HMAC. The format is described below.</li> <li><b>hmac_keyId</b> - Key ID used to generate HMAC</li> <li><b>hmac_alg</b> - Algorithm used to generate HMAC</li> <li><b>hmac_value</b> - HMAC generated for hmac.input</li></ul> |
|
12
|
+
**buyer_address** <br>(Optional)| **String** | Address of buyer. Refund operations on this payment will use this address. You can set this to your address to manually handle refunds (outside of Bleumi Pay) to your buyer. This address must be able to receive payments from smart contracts. |
|
13
|
+
**chain** <br>(Optional)| [**Chain**](Chain.md) | (Required if specifying 'token') Network in which the hosted checkout is to be created. Please refer to the [Supported Networks.](https://pay.bleumi.com/docs/#supported-networks) |
|
14
|
+
**token** <br>(Optional)| **String** | If this field is not specified, a list of tokens configured for the provided currency code for the Hosted Checkout in your account in the <a href="https://pay.bleumi.com/app/" target="_blank">Bleumi Pay Dashboard</a> is sent to the buyer. The buyer can complete the payment using any one of token from this list. <br><br> Set the token which must be used by the buyer for this payment. The token provided must be set in your portal for the provided currency code. The token is assumed to be 1:1 with the currency unit. <br><br> <b>ETH</b> - for Ethereum<br> <b>XDAI</b> - for xDai<br> <b>XDAIT</b> - for xDai Testnet<br> <b>ALGO</b> - for Algo<br> <b><asset id></b> - for Algorand Standard Asset<br> <b><contract address of ERC-20 token></b> - for ERC-20; Please refer to [ERC-20 Tokens](https://pay.bleumi.com/docs/#erc-20) for contract address; |
|
15
|
+
**base64_transform** <br>(Optional)| **Boolean** | Base64 encode hmac_input GET parameter passed to the successUrl |
|
16
16
|
|
17
17
|
## Example
|
18
18
|
|
@@ -24,7 +24,7 @@ You can set this to your address to manually handle refunds (outside of Bleumi P
|
|
24
24
|
"cancelUrl": "https://demo.store/api/cancelOrder",
|
25
25
|
"successUrl": "https://demo.store/api/completeOrder",
|
26
26
|
"token":"0x115615dbd0f835344725146fa6343219315f15e5",
|
27
|
-
"chain":"
|
27
|
+
"chain":"goerli",
|
28
28
|
"buyerAddress":"0x713883BF69B786f0A7aB6E2248a70C50577F6b34"
|
29
29
|
}
|
30
30
|
```
|
@@ -5,9 +5,9 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**id** | **String** | Unique ID identifying the payment |
|
8
|
-
**buyer_address** |
|
9
|
-
**transfer_address** |
|
10
|
-
|
8
|
+
**buyer_address** | **String** | Address of buyer. Refund operations on this wallet will use this address. You can set this to your address to manually handle refunds (outside of Bleumi Pay) to your buyer. <br/> <b>Warning!</b> - This address must be able to receive payments from smart contracts.|
|
9
|
+
**transfer_address** | **String** | Your deposit address. Settle operations on this wallet will use this address. <br/> <b>Warning!</b> - This address must be able to receive payments from smart contracts.|
|
10
|
+
**token** <br> (Optional) | **String** | (Only for Algorand Standard Asset) Asset id which will be used for payment. |
|
11
11
|
## Example
|
12
12
|
|
13
13
|
```json
|
data/docs/CreatePayoutRequest.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**txid** | **String** | Unique identifier for this payout |
|
8
|
-
**token** |
|
8
|
+
**token** | **String** | <b>ETH</b> - for Ethereum <br/> <b>XDAI</b> - for xDai <br/> <b>XDAIT</b> - for xDai Testnet <br/> <b>ALGO</b> - for Algo <br/> <b><asset id></b> - for Algorand Standard Asset payouts <br/> <b> <contract address of ERC-20 token></b> - for ERC-20 payouts; Please refer to Please refer to [ERC-20 Tokens](https://pay.bleumi.com/docs/#erc-20) for contract address; |
|
9
9
|
**payouts** | [**Array<Payout>**](Payout.md) | Array of payments to be made in this payout. This is an atomic transaction (i.e. either all payments are processed or all of them are rejected). |
|
10
10
|
|
11
11
|
## Example
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# BleumiPay::EthereumBalance
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**mainnet** <br>(Optional) | [**Hash<String, WalletBalance>**](WalletBalance.md) | A dictionary which gives the token balances in Ethereum MainNet |
|
8
|
+
**goerli** <br>(Optional) | [**Hash<String, WalletBalance>**](WalletBalance.md) | A dictionary which gives the token balances in Ethereum Goerli TestNet |
|
9
|
+
**xdai** <br>(Optional) | [**Hash<String, WalletBalance>**](WalletBalance.md) | A dictionary which gives the token balances in xDAI |
|
10
|
+
**xdai_testnet** <br>(Optional) | [**Hash<String, WalletBalance>**](WalletBalance.md) | A dictionary which gives the token balances in xDAI TestNet |
|
11
|
+
|
12
|
+
## Example - Goerli - TestNet
|
13
|
+
|
14
|
+
```json
|
15
|
+
{
|
16
|
+
"balances": {
|
17
|
+
"ethereum": {
|
18
|
+
"goerli": {
|
19
|
+
"0x115615dbd0f835344725146fa6343219315f15e5": {
|
20
|
+
"blockNum": "2049977",
|
21
|
+
"token_balance": "10000000",
|
22
|
+
"balance": "10",
|
23
|
+
"token_decimals": 6
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
```
|
data/docs/HostedCheckoutsApi.md
CHANGED
@@ -29,9 +29,9 @@ create_checkout_url_request.currency = "<CURRENCY>" # Eg. USD
|
|
29
29
|
create_checkout_url_request.amount = "<AMOUNT>" # Eg. 10
|
30
30
|
create_checkout_url_request.success_url = "<SUCCESS_URL>" # Eg. https://demo.store/api/completeOrder
|
31
31
|
create_checkout_url_request.cancel_url = "<CANCEL_URL>" # Eg. https://demo.store/api/cancelOrder
|
32
|
-
create_checkout_url_request.token =
|
33
|
-
create_checkout_url_request.chain = BleumiPay::Chain::
|
34
|
-
create_checkout_url_request.buyer_address =
|
32
|
+
create_checkout_url_request.token = '<TOKEN>' # Replace <TOKEN> with ETH or XDAI or ERC-20 Token Contract Address or XDAIT
|
33
|
+
create_checkout_url_request.chain = BleumiPay::Chain::GOERLI #
|
34
|
+
create_checkout_url_request.buyer_address = '<BUYER_ADDR>' # Replace <BUYER_ADDR> with the buyer's Ethereum Address
|
35
35
|
|
36
36
|
|
37
37
|
#Generate a unique checkout URL to accept payment.
|
@@ -62,11 +62,25 @@ url | string | URL for buyer to complete payment
|
|
62
62
|
|
63
63
|
The hmac.input GET parameter passed to successUrl contains payment parameters as a pipe ('|') separated string in the following order,
|
64
64
|
<ul style="font-weight: 500">
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
65
|
+
<li><b>Chain</b> - Please refer documentation for <a href="https://pay.bleumi.com/docs/#supported-networks" target="_blank">Supported Networks</a> </li>
|
66
|
+
<li><b>Wallet Address</b></li>
|
67
|
+
<li><b>Token</b><br>
|
68
|
+
<i>ETH</i> - for Ethereum<br>
|
69
|
+
<i>XDAI</i> - for xDai<br>
|
70
|
+
<i>XDAIT</i> - for xDai Testnet<br>
|
71
|
+
<i>ALGO</i> - for Algo <br>
|
72
|
+
<i><asset id></i> - for Algorand Standard Asset <br>
|
73
|
+
<i><contract address of ERC-20 token></i> - for ERC-20; Please refer to <a href="https://pay.bleumi.com/docs/#erc-20" target="_blank">ERC-20 Tokens</a> for contract address; </li>
|
74
|
+
<li><b>Amount</b> - Token amount for the payment</li>
|
75
|
+
<li><b>Number of block confirmations</b><br>
|
76
|
+
<i>12</i> - for ETH<br>
|
77
|
+
<i>0</i> - for XDAI<br>
|
78
|
+
<i>0</i> - for XDAIT<br>
|
79
|
+
<i>0</i> - for ALGO<br>
|
80
|
+
<i>0</i> - for Algorand Standard Asset<br>
|
81
|
+
<i>12</i> - for ERC-20<br>
|
82
|
+
</li>
|
83
|
+
</li>
|
70
84
|
</ul>
|
71
85
|
|
72
86
|
<aside class="notice">
|
@@ -88,7 +102,7 @@ ValidationError <br> <i>invalid_token</i> | The token provided is not valid for
|
|
88
102
|
|
89
103
|
## list_tokens
|
90
104
|
|
91
|
-
>
|
105
|
+
> Array<CheckoutToken> list_tokens
|
92
106
|
|
93
107
|
Retrieve all tokens configured for the Hosted Checkout in your account in the [Bleumi Pay Dashboard](https://pay.bleumi.com/app/).
|
94
108
|
|
@@ -120,7 +134,7 @@ This endpoint does not need any parameter.
|
|
120
134
|
|
121
135
|
### Return type
|
122
136
|
|
123
|
-
[**
|
137
|
+
[**Array<CheckoutToken>**](CheckoutToken.md)
|
124
138
|
|
125
139
|
|
126
140
|
### 400 Errors
|
@@ -155,9 +169,9 @@ api_instance = BleumiPay::HostedCheckoutsApi.new
|
|
155
169
|
begin
|
156
170
|
validate_checkout_request = BleumiPay::ValidateCheckoutRequest.new # ValidateCheckoutRequest | Specify validation of checkout parameters.
|
157
171
|
validate_checkout_request.hmac_alg = '<ALD>' # Eg. HMAC-SHA256-HEX
|
158
|
-
validate_checkout_request.hmac_input = '<INPUT>' # Eg.
|
172
|
+
validate_checkout_request.hmac_input = '<INPUT>' # Eg. goerli|0xbeaea438bc2e19d097906b597219c288e8eb7b2e|0x115615dbd0f835344725146fa6343219315f15e5|10|12
|
159
173
|
validate_checkout_request.hmac_key_id = '<VER>' # Eg. v1
|
160
|
-
validate_checkout_request.hmac_value = '<HMAC_VALUE>' # Eg.
|
174
|
+
validate_checkout_request.hmac_value = '<HMAC_VALUE>' # Eg. bdf82eb42efac09150d62ac1bcadd2fd0f64852ded2b571567c905217adf246a
|
161
175
|
#Validate the GET parameters passed by Hosted Checkout in successUrl upon successfully completing payment.
|
162
176
|
result = api_instance.validate_checkout_payment(validate_checkout_request)
|
163
177
|
p result
|
@@ -5,8 +5,7 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**results** | [**Array<PaymentOperation>**](PaymentOperation.md) | List of operations of the payment in the current page |
|
8
|
-
**next_token** | **String** | Cursor to fetch next page of results, empty if no more results |
|
9
|
-
|
8
|
+
**next_token** <br> (Optional) | **String** | Cursor to fetch next page of results, empty if no more results |
|
10
9
|
|
11
10
|
## Example
|
12
11
|
|
@@ -26,4 +25,4 @@ Name | Type | Description | Notes
|
|
26
25
|
}
|
27
26
|
]
|
28
27
|
}
|
29
|
-
```
|
28
|
+
```
|
data/docs/PaginatedPayments.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**results** | [**Array<Payment>**](Payment.md) | List of payments in the current page |
|
8
|
-
**next_token** | **String** | Cursor to fetch next page of results, empty if no more results |
|
8
|
+
**next_token** <br> (Optional) | **String** | Cursor to fetch next page of results, empty if no more results |
|
9
9
|
|
10
10
|
## Example
|
11
11
|
|
@@ -16,14 +16,14 @@ Name | Type | Description | Notes
|
|
16
16
|
"id": "2",
|
17
17
|
"addresses": {
|
18
18
|
"ethereum": {
|
19
|
-
"
|
19
|
+
"goerli": {
|
20
20
|
"addr": "0xbe02daaf993b29302c2e983b63eca1465c227245"
|
21
21
|
}
|
22
22
|
}
|
23
23
|
},
|
24
24
|
"balances": {
|
25
25
|
"ethereum": {
|
26
|
-
"
|
26
|
+
"goerli": {
|
27
27
|
"0x84df8548086ec9025e9c93297058bed706e90ddd": {
|
28
28
|
"blockNum": "6831652",
|
29
29
|
"token_balance": "0",
|
@@ -5,7 +5,7 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**results** | [**Array<PayoutItem>**](PayoutItem.md) | List of payouts of the payment in the current page |
|
8
|
-
**next_token** | **String** | Cursor to fetch next page of results, empty if no more results |
|
8
|
+
**next_token** (Optional) | **String** | Cursor to fetch next page of results, empty if no more results |
|
9
9
|
|
10
10
|
## Example
|
11
11
|
|
data/docs/Payment.md
CHANGED
data/docs/PaymentAddresses.md
CHANGED
@@ -4,7 +4,8 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**ethereum** | [**Hash<String, WalletAddress>**](WalletAddress.md) | A dictionary which gives the address of the wallet generated for each network
|
7
|
+
**ethereum** | [**Hash<String, WalletAddress>**](WalletAddress.md) | A dictionary which gives the address of the wallet generated for each Ethereum network |
|
8
|
+
**algorand** | [**Hash<String, WalletAddress>**](WalletAddress.md) | A dictionary which gives the address of the wallet generated for each Algorand network |
|
8
9
|
|
9
10
|
## Example
|
10
11
|
|
data/docs/PaymentBalances.md
CHANGED
@@ -4,7 +4,8 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**ethereum** | [**
|
7
|
+
**ethereum** <br> (Optional) | [**EthereumBalance**](EthereumBalance.md) | A dictionary which gives the token balances in each Ethereum network |
|
8
|
+
**algorand** <br> (Optional) | [**AlgorandBalance**](AlgorandBalance.md) | A dictionary which gives the token balances in each Algorand network |
|
8
9
|
|
9
10
|
## Example
|
10
11
|
|
data/docs/PaymentOperation.md
CHANGED
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**txid** | **String** | Transaction ID of the operation | [optional]
|
8
8
|
**chain** | **String** | Network in which the operation was carried out |
|
9
|
-
**func_name** | **String** | Name of the function invoked on the Payment Processor.<br/><br/>Functions available:<br/> - createAndSettleWallet<br/> - createAndRefundWallet
|
9
|
+
**func_name** | **String** | Name of the function invoked on the Payment Processor.<br/><br/>Functions available:<br/> - createAndSettleWallet<br/> - createAndRefundWallet
|
10
10
|
**status** | **Boolean** | <b>null</b> - operation in progress <br/> <b>true</b> - operation completed successfuly <br/> <b>false</b> - operation failed to process |
|
11
11
|
**inputs** | [**PaymentOperationInputs**](PaymentOperationInputs.md) | The inputs provided during this operation creation |
|
12
12
|
**hash** | **String** | Transaction hash of operation submitted to the network. This field is blank when operation is in progress. |
|
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
|
|
16
16
|
```json
|
17
17
|
{
|
18
18
|
"txid": "1574828863297",
|
19
|
-
"chain": "
|
19
|
+
"chain": "goerli",
|
20
20
|
"funcName": "createAndSettleWallet",
|
21
21
|
"inputs": {
|
22
22
|
"addr": "0xbec374e0acb4b7b6fde45b11287e61beb108e868",
|
@@ -5,10 +5,10 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**addr** | **String** | Address of the wallet |
|
8
|
-
**amount** | **String** | Amount (Only for settle operation) |
|
9
|
-
**token** | **String** | <b>ETH</b> - for Ethereum <br/>
|
10
|
-
**token_amount** | **String** | Token amount to be settled in network format (Only for settle operation) |
|
11
|
-
**token_decimals** | **Integer** | Token decimal places (Only for settle operation) |
|
8
|
+
**amount** <br> (Optional) | **String** | Amount (Only for settle operation) |
|
9
|
+
**token** | **String** | <b>ETH</b> - for Ethereum <br/> <b>XDAI</b> - for xDai <br/> <b>XDAIT</b> - for xDai Testnet <br/> <b>ALGO</b> - for Algo <br/> <b><asset id></b> - for Algorand Standard Asset <br/> <b> <contract address of ERC-20 token></b> - for ERC-20; Please refer to [ERC-20 Tokens](https://pay.bleumi.com/docs/#erc-20) for contract address; |
|
10
|
+
**token_amount** <br> (Optional) | **String** | Token amount to be settled in network format (Only for settle operation) |
|
11
|
+
**token_decimals** <br> (Optional) | **Integer** | Token decimal places (Only for settle operation) |
|
12
12
|
|
13
13
|
## Settle Operation Example
|
14
14
|
|