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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd1f544b9323fc82089e1541a286b96bcef386d81b13fd004b998a4033b0d07a
4
- data.tar.gz: 568bfa758b7c634b3d198b50c4b1e4d50de585175ef04748691f41c547221ed2
3
+ metadata.gz: 771c14e38413252cd78bee824fe142c02a61a3f54c0ce0c8fa5087cbfc64d17b
4
+ data.tar.gz: 357085a821207ba87e3f1680ca0f96067c6ba6f67a9c0afc80d347e766cea28d
5
5
  SHA512:
6
- metadata.gz: 6c5fcb59a0e5d9cae326351b197ab896c340d49f761e1e6e41ecb237ea22cb416b64d99735b02ca0fe89f5977761ae8029d4f9d3616c7ca064755f740e3bbdaf
7
- data.tar.gz: a09249bd663fc9ea826c60f09672ab897fa8b79b04401f411f2ff6ab6169db05001ea940757891ead3586b281b14d557501b519407db7c26f4c6d5281073d368
6
+ metadata.gz: d6816e92d71700a2a58052024c7748b5bf1aa98be51b98e31f75d9fd5ef0a8df94d8004931d431079ea9610d1d8ef53b39b6908a2ea0d67e2d77b68c499d85ba
7
+ data.tar.gz: b74079031419fe7526b58988226411a88c4dbf6f360de583744c72fc27ab51580d064386093cd801ec1a9b7c157aa8bb9e6c9bc1a4c6c897a2d85e066c286193
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- remitano (1.5.1)
4
+ remitano (1.5.2)
5
5
  activesupport (>= 4.2.10)
6
6
  api-auth (~> 2.1.0)
7
7
  hashie
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
@@ -1,3 +1,3 @@
1
1
  module Remitano
2
- VERSION = "1.5.1"
2
+ VERSION = "1.5.2"
3
3
  end
@@ -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" => 1622185022,
60
- "id" => 63,
61
- "ref" => "MDR4027222151",
62
- "remitano_payment_url" => "localhost:3200/payment_gateway/pay/MDR4027222151",
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","usec":0}'
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
- - Fri, 28 May 2021 06:57:02 GMT
20
+ - Sun, 30 May 2021 16:52:25 GMT
20
21
  Authorization:
21
- - APIAuth REMITANO_KEY:KAd9sygInnj8CCEmNJSTq1afnwU=
22
+ - APIAuth REMITANO_KEY:Z9lVNAYWeb3R79N83MzGM+5MHOg=
22
23
  Content-Length:
23
- - '124'
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/"8342279df77afbcd411d0e0e9223432b"
35
+ - W/"7504d0925da5f3d935e6148038113712"
35
36
  Cache-Control:
36
37
  - max-age=0, private, must-revalidate
37
38
  Set-Cookie:
38
- - _admin_session=ee5e9ea148444320646db27508a03d2b; path=/; expires=Mon, 28 Jun
39
- 2021 06:57:02 -0000; HttpOnly; SameSite=Lax
39
+ - _admin_session=fcfc0dc721c0a312b88341d2b8b42ea4; path=/; expires=Wed, 30 Jun
40
+ 2021 16:52:25 -0000; HttpOnly; SameSite=Lax
40
41
  X-Request-Id:
41
- - ee909bea-653a-4fa1-8e3a-8f45ee4e5f9e
42
+ - f3cd882c-014e-43bb-a55f-4a5cd1c6a24b
42
43
  X-Runtime:
43
- - '0.085582'
44
+ - '0.462043'
44
45
  Vary:
45
46
  - Origin
46
47
  Content-Length:
47
- - '272'
48
+ - '303'
48
49
  body:
49
50
  encoding: UTF-8
50
- string: '{"id":63,"coin_currency":"usdt","coin_amount":10.99,"status":"pending","ref":"MDR4027222151","cancelled_or_completed_callback_url":"http://sample.com/123/callback","remitano_payment_url":"localhost:3200/payment_gateway/pay/MDR4027222151","created_at_timestamp":1622185022}'
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: Fri, 28 May 2021 06:57:02 GMT
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'] = 'key'
2
- ENV['REMITANO_SECRET'] = 'secret'
3
- ENV['REMITANO_AUTHENTICATOR_SECRET'] = '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.1
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-28 00:00:00.000000000 Z
11
+ date: 2021-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport