spree_vpago 2.1.0.pre.beta4 → 2.1.0

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: dbfb239aa0395206cb255a51ff243aa618fa47c399b2fef2367ea5dde16f6f94
4
- data.tar.gz: 017ec1b676d5b8f25a5df7b7290328dd08abe7d5dc980b5a03cf3d0b09d07ed3
3
+ metadata.gz: 9c9ce227143c8106d8c5084630d0fe37d326af055cf7b7fd907b974425a7684a
4
+ data.tar.gz: 85a48677949896599736a58e4993d28c11d75381b06e9fd0b3739f45a7b4b748
5
5
  SHA512:
6
- metadata.gz: 3e9fac54d3cba2fa377760d6d1cd62c21492261bb7d4b9bb25136fcb824ef3b8279b3d151fda5ca9aa17778e1be978abab6ef538a4766a0ddc022f4bbe21c634
7
- data.tar.gz: 88d6a68b9506fff5855889b3352376e9fbf67bd0a0522b64c992062afbc542f6baa1f6bda64042c9f605d6506af9acb641fac079c9487aa571f39af05b2b31b4
6
+ metadata.gz: 98c4e438907e5a241357ff997546dcdbadd1187a45fb4db3be8e7a5aabf94a722f1f25f2084788cded45eb7668ad3213c3e4603d78e8c8bd42c9746f62ae9c23
7
+ data.tar.gz: 660c08f76c5e32ce96708c4ae468bc8b81546db1c8206d9cad658d98bef9a2d8457e93d3b41c047d95c6e30e79c82b4d2546bdd6221f3dbe9902f9eca43717da
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spree_vpago (2.1.0.pre.beta4)
4
+ spree_vpago (2.1.0)
5
5
  faraday
6
6
  google-cloud-firestore
7
7
  spree_api (>= 4.5)
@@ -242,7 +242,7 @@ GEM
242
242
  gapic-common (~> 1.0)
243
243
  google-cloud-errors (~> 1.0)
244
244
  google-logging-utils (0.2.0)
245
- google-protobuf (4.31.1)
245
+ google-protobuf (4.31.1-arm64-darwin)
246
246
  bigdecimal
247
247
  rake (>= 13)
248
248
  googleapis-common-protos (1.8.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.74.0)
262
+ grpc (1.73.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)
@@ -3,7 +3,7 @@ module Spree
3
3
  layout 'vpago_payments'
4
4
  helper 'vpago/vpago_payments'
5
5
 
6
- skip_before_action :verify_authenticity_token, only: %i[process_payment true_money_process_payment]
6
+ skip_before_action :verify_authenticity_token, only: [:process_payment]
7
7
 
8
8
  rescue_from ActiveRecord::RecordNotFound, with: :render_not_found
9
9
  rescue_from CanCan::AccessDenied, with: :access_denied
@@ -55,21 +55,6 @@ module Spree
55
55
  render json: { status: :internal_server_error, message: 'Failed to enqueue payment processor job' }, status: :internal_server_error
56
56
  end
57
57
 
58
- # POST
59
- def true_money_process_payment
60
- return render json: { status: { code: '000001', message: 'success' }, data: nil }, status: :ok if request.method != 'POST'
61
-
62
- @payment = Spree::Payment.find_by(number: params.dig(:data, :external_ref_id))
63
- return render_not_found unless @payment
64
-
65
- Vpago::PaymentProcessorJob.perform_later(payment_number: @payment.number) unless @payment.order.paid?
66
-
67
- render json: { status: { code: '000001', message: 'success' }, data: nil }, status: :ok
68
- rescue StandardError => e
69
- Rails.logger.error("Payment error: #{e.message}")
70
- render json: { status: :internal_server_error, message: 'Failed to enqueue payment processor job' }, status: :internal_server_error
71
- end
72
-
73
58
  def sanitize_return_params
74
59
  sanitized_params = params.permit!.to_h
75
60
 
@@ -44,7 +44,7 @@ module Vpago
44
44
 
45
45
  return failure(payment) if payment.errors.any?
46
46
 
47
- success(order: order, payment: payment)
47
+ success(order: order)
48
48
  end
49
49
  end
50
50
  end
data/config/routes.rb CHANGED
@@ -24,7 +24,6 @@ Spree::Core::Engine.add_routes do
24
24
  get :success
25
25
 
26
26
  match :process_payment, via: %i[get post]
27
- match :true_money_process_payment, via: %i[get post]
28
27
  end
29
28
  end
30
29
 
@@ -1,7 +1,7 @@
1
1
  module SpreeVpago
2
2
  module_function
3
3
 
4
- VERSION = '2.1.0-beta4'.freeze
4
+ VERSION = '2.1.0'.freeze
5
5
 
6
6
  def version
7
7
  Gem::Version.new VERSION
@@ -40,14 +40,11 @@ module Vpago
40
40
  end
41
41
 
42
42
  def merchant_auth
43
- merchant_auth = {
43
+ {
44
44
  'mc_id' => merchant_id,
45
45
  'tran_id' => transaction_id,
46
46
  'complete_amount' => amount.to_s
47
- }
48
-
49
- merchant_auth['payout'] = payout unless payout.nil?
50
- merchant_auth.to_json
47
+ }.to_json
51
48
  end
52
49
 
53
50
  def merchant_auth_encryption
@@ -37,10 +37,10 @@ module Vpago
37
37
 
38
38
  def refund_payload
39
39
  {
40
- transactionId: @payment.transaction_response['transactionId'],
41
- paymentId: @payment.transaction_response['paymentId'],
42
- amount: @payment.transaction_response['amount'],
43
- currency: 'USD'
40
+ transactionId: @payment.transaction_response["transactionId"],
41
+ paymentId: @payment.transaction_response["paymentId"],
42
+ amount: @payment.transaction_response["amount"],
43
+ currency: 'USD'
44
44
  }
45
45
  end
46
46
 
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.0.pre.beta4
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - You
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-07 00:00:00.000000000 Z
11
+ date: 2025-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -260,8 +260,6 @@ files:
260
260
  - app/views/spree/acleda_redirects/show.html.erb
261
261
  - app/views/spree/admin/payments/source_forms/_payment_payway.html.erb
262
262
  - app/views/spree/admin/payments/source_forms/_payway_v2.html.erb
263
- - app/views/spree/admin/payments/source_forms/_true_money.html.erb
264
- - app/views/spree/admin/payments/source_forms/_vattanac_mini_app.html.erb
265
263
  - app/views/spree/admin/payments/source_views/_acleda.html.erb
266
264
  - app/views/spree/admin/payments/source_views/_acleda_mobile.html.erb
267
265
  - app/views/spree/admin/payments/source_views/_payment_payway.html.erb
@@ -418,9 +416,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
418
416
  version: 3.2.0
419
417
  required_rubygems_version: !ruby/object:Gem::Requirement
420
418
  requirements:
421
- - - ">"
419
+ - - ">="
422
420
  - !ruby/object:Gem::Version
423
- version: 1.3.1
421
+ version: '0'
424
422
  requirements:
425
423
  - none
426
424
  rubygems_version: 3.4.1
@@ -1,7 +0,0 @@
1
- <%
2
- # create payment on the backend
3
- # we don't allow payment to be created by the backend
4
-
5
- %>
6
-
7
-