spree_vpago 2.1.4.pre.beta → 2.1.4.pre.beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8e5d1ebc75ade2a4d140a91ff3b3502fb8109420692dbae8151e32c3b1d68f0
4
- data.tar.gz: 16dc1a6c62f143417432dd9aefd1be3c247ff0279e204da8dda0d73a436c6c65
3
+ metadata.gz: 76c7d879f66187b0dc1ad98a8a9530e93e8783af2407832ea3604a9c9ae1e5d7
4
+ data.tar.gz: 2937b5f057dcda1802b875663aa2cf989ab18e100cc0161c28ef47b5962b84d2
5
5
  SHA512:
6
- metadata.gz: 4574565cf96154a08f4bcc8918331715daf9364b455f8d34f1a38327239d278909f0af91a20be819c69fe63f7bbb461ffd2de4ea4bf057ed293acab850f1594a
7
- data.tar.gz: aba7990821991e66322ba01fee2d955c3faa76e7564c3bd327b80381aec9827f8557137b1699a968633b5802e443e8249ab2b39041836b83e139df6bc6b9cf0f
6
+ metadata.gz: 84115ee094881bb1df4792bf384ba5029726188cabddb826504757905a650e3d7aaae81359fd190d69af7715ac694452238468f0deb662d9b542b223d510b288
7
+ data.tar.gz: 7f719b638dd3204832f191175b89ceebb71571bbda923b76448d9ce812fa100db0a79ce173e3744cc445a6616e75c484d0c627003311ed9b30cba371959a4b59
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spree_vpago (2.1.4.pre.beta)
4
+ spree_vpago (2.1.4.pre.beta2)
5
5
  faraday
6
6
  google-cloud-firestore
7
7
  spree_api (>= 4.5)
@@ -242,7 +242,7 @@ GEM
242
242
  gapic-common (~> 1.2)
243
243
  google-cloud-errors (~> 1.0)
244
244
  google-logging-utils (0.2.0)
245
- google-protobuf (4.33.0)
245
+ google-protobuf (4.33.0-arm64-darwin)
246
246
  bigdecimal
247
247
  rake (>= 13)
248
248
  googleapis-common-protos (1.9.0)
@@ -259,7 +259,7 @@ GEM
259
259
  multi_json (~> 1.11)
260
260
  os (>= 0.9, < 2.0)
261
261
  signet (>= 0.16, < 2.a)
262
- grpc (1.76.0)
262
+ grpc (1.76.0-arm64-darwin)
263
263
  google-protobuf (>= 3.25, < 5.0)
264
264
  googleapis-common-protos-types (~> 1.0)
265
265
  hashdiff (1.1.0)
@@ -8,7 +8,6 @@ module Spree
8
8
  preference :password, :string
9
9
  preference :merchant_id, :string
10
10
  preference :payment_type, :string, default: 'GOLF_TICKET'
11
- preference :open_type, :string, default: 'both'
12
11
 
13
12
  def method_type
14
13
  'vattanac'
@@ -24,7 +23,6 @@ module Spree
24
23
  end
25
24
 
26
25
  # override
27
- # purchase is used when pre auth disabled
28
26
  def purchase(_amount, _source, gateway_options = {})
29
27
  _, payment_number = gateway_options[:order_id].split('-')
30
28
  payment = Spree::Payment.find_by(number: payment_number)
@@ -44,13 +42,6 @@ module Spree
44
42
  end
45
43
  end
46
44
 
47
- def vattanac_refund(payment)
48
- refund_issuer = Vpago::Vattanac::RefundIssuer.new(payment, {})
49
- refund_issuer.call
50
-
51
- [refund_issuer.success?, refund_issuer.parsed_response]
52
- end
53
-
54
45
  def cancel(_response_code, _payment)
55
46
  # we can use this to send request to payment gateway api to cancel the payment ( void )
56
47
  # currently Vattanac does not support to cancel the gateway
@@ -9,6 +9,7 @@ module Vpago
9
9
  :processing_url,
10
10
  :success_url,
11
11
  :process_payment_url,
12
+ :processing_deeplink_url,
12
13
  to: :url_constructor
13
14
  end
14
15
 
@@ -11,6 +11,7 @@ module Vpago
11
11
 
12
12
  def self.prepended(base)
13
13
  base.preference :icon_name, :string, default: 'cheque'
14
+ base.preference :app_scheme, :string, default: 'bookmeplus://'
14
15
  base.belongs_to :vendor, class_name: 'Spree::Vendor', optional: true, inverse_of: :payment_methods
15
16
 
16
17
  def base.vpago_payments
@@ -14,6 +14,7 @@ module Vpago
14
14
  def processing_url = "#{base_url}/vpago_payments/processing?#{query}"
15
15
  def success_url = "#{base_url}/vpago_payments/success?#{query}"
16
16
  def process_payment_url = "#{base_url}/vpago_payments/process_payment?#{query}"
17
+ def processing_deeplink_url = "#{app_scheme}#{URI(base_url).host}/vpago_payments/processing?#{query}"
17
18
 
18
19
  def query
19
20
  {
@@ -30,6 +31,10 @@ module Vpago
30
31
 
31
32
  private
32
33
 
34
+ def app_scheme
35
+ payment.payment_method.preferred_app_scheme
36
+ end
37
+
33
38
  def base_url
34
39
  order.payment_host
35
40
  end
@@ -7,7 +7,6 @@
7
7
  const platform = "<%= params[:platform] %>";
8
8
  const mobileUrl = "<%= raw(result[:mobile_url]) %>";
9
9
  const webUrl = "<%= raw(result[:web_url]) %>";
10
-
11
10
  if (platform === "app" && mobileUrl) {
12
11
  window.location.href = mobileUrl;
13
12
  } else if (platform === "web" && webUrl) {
@@ -1,7 +1,7 @@
1
1
  module SpreeVpago
2
2
  module_function
3
3
 
4
- VERSION = '2.1.4-beta'.freeze
4
+ VERSION = '2.1.4-beta2'.freeze
5
5
 
6
6
  def version
7
7
  Gem::Version.new VERSION
@@ -78,7 +78,6 @@ module Vpago
78
78
  end
79
79
 
80
80
  def post(url, body)
81
-
82
81
  response = Faraday.post(url, body.to_json, default_headers)
83
82
  parse_json(response.body)
84
83
  end
@@ -25,3 +25,4 @@ module Vpago
25
25
  end
26
26
  end
27
27
  end
28
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_vpago
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4.pre.beta
4
+ version: 2.1.4.pre.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - You
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-03 00:00:00.000000000 Z
11
+ date: 2025-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday