remitano 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -1
- data/lib/remitano/client/merchant_charges.rb +3 -2
- data/lib/remitano/version.rb +1 -1
- data/spec/client/merchant_charges_spec.rb +7 -5
- data/spec/fixtures/vcr_cassettes/Remitano_Client_merchant_charges/_create/valid_params/returns_created_charge.yml +14 -12
- data/spec/support/crendentials.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 771c14e38413252cd78bee824fe142c02a61a3f54c0ce0c8fa5087cbfc64d17b
|
4
|
+
data.tar.gz: 357085a821207ba87e3f1680ca0f96067c6ba6f67a9c0afc80d347e766cea28d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6816e92d71700a2a58052024c7748b5bf1aa98be51b98e31f75d9fd5ef0a8df94d8004931d431079ea9610d1d8ef53b39b6908a2ea0d67e2d77b68c499d85ba
|
7
|
+
data.tar.gz: b74079031419fe7526b58988226411a88c4dbf6f360de583744c72fc27ab51580d064386093cd801ec1a9b7c157aa8bb9e6c9bc1a4c6c897a2d85e066c286193
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -56,7 +56,8 @@ client.merchant_charges.get(id)
|
|
56
56
|
client.merchant_charges.create(
|
57
57
|
coin_currency: "usdt",
|
58
58
|
coin_amount: 10.99,
|
59
|
-
cancelled_or_completed_callback_url: "https://example.com/payments/callback?id=example"
|
59
|
+
cancelled_or_completed_callback_url: "https://example.com/payments/callback?id=example",
|
60
|
+
description: "Example charge"
|
60
61
|
)
|
61
62
|
```
|
62
63
|
Note: For now, we only support `usdt` as the price coin currency.
|
@@ -12,12 +12,13 @@ module Remitano
|
|
12
12
|
config.net.get("/merchant/merchant_charges/#{id}").execute
|
13
13
|
end
|
14
14
|
|
15
|
-
def create(coin_currency:, coin_amount:, cancelled_or_completed_callback_url:)
|
15
|
+
def create(coin_currency:, coin_amount:, cancelled_or_completed_callback_url:, description: nil)
|
16
16
|
config.net.post(
|
17
17
|
"/merchant/merchant_charges",
|
18
18
|
coin_currency: coin_currency,
|
19
19
|
coin_amount: coin_amount,
|
20
|
-
cancelled_or_completed_callback_url: cancelled_or_completed_callback_url
|
20
|
+
cancelled_or_completed_callback_url: cancelled_or_completed_callback_url,
|
21
|
+
description: description
|
21
22
|
).execute
|
22
23
|
end
|
23
24
|
end
|
data/lib/remitano/version.rb
CHANGED
@@ -50,16 +50,18 @@ describe "Remitano::Client#merchant_charges" do
|
|
50
50
|
result = client.merchant_charges.create(
|
51
51
|
coin_currency: "usdt",
|
52
52
|
coin_amount: 10.99,
|
53
|
-
cancelled_or_completed_callback_url: "http://sample.com/123/callback"
|
53
|
+
cancelled_or_completed_callback_url: "http://sample.com/123/callback",
|
54
|
+
description: "Example charge"
|
54
55
|
)
|
55
56
|
expect(result).to eq(
|
56
57
|
"cancelled_or_completed_callback_url" => "http://sample.com/123/callback",
|
57
58
|
"coin_amount" => 10.99,
|
58
59
|
"coin_currency" => "usdt",
|
59
|
-
"created_at_timestamp" =>
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"
|
60
|
+
"created_at_timestamp" => 1622393545,
|
61
|
+
"description" => "Example charge",
|
62
|
+
"id" => 64,
|
63
|
+
"ref" => "MDR1341467273",
|
64
|
+
"remitano_payment_url" => "localhost:3200/payment_gateway/pay/MDR1341467273",
|
63
65
|
"status" => "pending"
|
64
66
|
)
|
65
67
|
end
|
@@ -5,7 +5,8 @@ http_interactions:
|
|
5
5
|
uri: REMITANO_SERVER/api/v1/merchant/merchant_charges
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"coin_currency":"usdt","coin_amount":10.99,"cancelled_or_completed_callback_url":"http://sample.com/123/callback","
|
8
|
+
string: '{"coin_currency":"usdt","coin_amount":10.99,"cancelled_or_completed_callback_url":"http://sample.com/123/callback","description":"Example
|
9
|
+
charge","usec":0}'
|
9
10
|
headers:
|
10
11
|
Accept:
|
11
12
|
- "*/*"
|
@@ -16,11 +17,11 @@ http_interactions:
|
|
16
17
|
Content-Type:
|
17
18
|
- application/json
|
18
19
|
Date:
|
19
|
-
-
|
20
|
+
- Sun, 30 May 2021 16:52:25 GMT
|
20
21
|
Authorization:
|
21
|
-
- APIAuth REMITANO_KEY:
|
22
|
+
- APIAuth REMITANO_KEY:Z9lVNAYWeb3R79N83MzGM+5MHOg=
|
22
23
|
Content-Length:
|
23
|
-
- '
|
24
|
+
- '155'
|
24
25
|
Host:
|
25
26
|
- localhost:3100
|
26
27
|
response:
|
@@ -31,23 +32,24 @@ http_interactions:
|
|
31
32
|
Content-Type:
|
32
33
|
- application/json
|
33
34
|
Etag:
|
34
|
-
- W/"
|
35
|
+
- W/"7504d0925da5f3d935e6148038113712"
|
35
36
|
Cache-Control:
|
36
37
|
- max-age=0, private, must-revalidate
|
37
38
|
Set-Cookie:
|
38
|
-
- _admin_session=
|
39
|
-
2021
|
39
|
+
- _admin_session=fcfc0dc721c0a312b88341d2b8b42ea4; path=/; expires=Wed, 30 Jun
|
40
|
+
2021 16:52:25 -0000; HttpOnly; SameSite=Lax
|
40
41
|
X-Request-Id:
|
41
|
-
-
|
42
|
+
- f3cd882c-014e-43bb-a55f-4a5cd1c6a24b
|
42
43
|
X-Runtime:
|
43
|
-
- '0.
|
44
|
+
- '0.462043'
|
44
45
|
Vary:
|
45
46
|
- Origin
|
46
47
|
Content-Length:
|
47
|
-
- '
|
48
|
+
- '303'
|
48
49
|
body:
|
49
50
|
encoding: UTF-8
|
50
|
-
string: '{"id":
|
51
|
+
string: '{"id":64,"coin_currency":"usdt","coin_amount":10.99,"status":"pending","ref":"MDR1341467273","description":"Example
|
52
|
+
charge","cancelled_or_completed_callback_url":"http://sample.com/123/callback","remitano_payment_url":"localhost:3200/payment_gateway/pay/MDR1341467273","created_at_timestamp":1622393545}'
|
51
53
|
http_version:
|
52
|
-
recorded_at:
|
54
|
+
recorded_at: Sun, 30 May 2021 16:52:25 GMT
|
53
55
|
recorded_with: VCR 4.0.0
|
@@ -1,6 +1,6 @@
|
|
1
|
-
ENV['REMITANO_KEY'] = '
|
2
|
-
ENV['REMITANO_SECRET'] = '
|
3
|
-
ENV['REMITANO_AUTHENTICATOR_SECRET'] = '
|
1
|
+
ENV['REMITANO_KEY'] = 'b4a3f24f3dcf340693432462ae23771e7efc7e0472cd3885fe046e47915790b1'
|
2
|
+
ENV['REMITANO_SECRET'] = 'osXCsK2bgAyKHGl/+2wPH0MbRON1UlncIl1A1PpfgFyOwOF1GxpcPinvarVeCTUOieOpbjqvwrcll8wZToOK5w=='
|
3
|
+
ENV['REMITANO_AUTHENTICATOR_SECRET'] = 'OYND3RBF3Z5ZB367AUILJ7QNRB5W3COC'
|
4
4
|
ENV["REMITANO_SERVER"] = "http://localhost:3100"
|
5
5
|
|
6
6
|
RSpec.configure do |config|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remitano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phuong Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|