dk_payment_gateway 1.0.4 → 1.0.5

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: e53639daaf974f1ff9de847415a07dd39affe51ee05c13fb14ed9d81ab5a55cb
4
- data.tar.gz: 8fa9b3b5121baed9771b30561bf5cdc093df2f37e344d6b1d20f9bb3d8ba292c
3
+ metadata.gz: 7d44c45dd8c6e7fb9ca0e8d5766150a2c397e76d1f93c53b188056c51a8ede96
4
+ data.tar.gz: bc758c046d2febf99163e785110cdd13ca9362e5b8af3258148e33b4e9167a47
5
5
  SHA512:
6
- metadata.gz: 1c28d86600b95617cda0340e05eb07aa89bf5a43cf8eade1651be1e21c7b67a54742b6f67c91c52a20cb75b0e5488a76dfd6b26b50fc76bfbfb6a0a53897dcd0
7
- data.tar.gz: 7e44662337c38f86c9cc497f87adb4d30e7da2ac6978617e2a951305be610a87a33e1dcb8a0bdbcfe77c45fb6b3c0ded179ef38df8c582875ee42b4967bf07ac
6
+ metadata.gz: 8f36987ebbdd3c695eb30687ae5d6827c1f117afb5c5236b6e24777aac37d805fdf62c55d7d02723a3d644cc9eb146edb02cdeeabc066cc4ff76c3eb8da11b8f
7
+ data.tar.gz: 199d7cdb9192342e1d39606ab354090796f4f97e0bae0cfbedd04e15165cbe505f9ac7b425257c4533b04f940129c8895ae056762c5c090ea3ce7206346422ed
@@ -17,9 +17,9 @@ module DkPaymentGateway
17
17
  #
18
18
  # @return [Hash] Response containing transaction status details
19
19
  def check_current_day_intra(params)
20
- validate_current_day_params!(params)
20
+ validate_current_day_intra_params!(params)
21
21
 
22
- request_body = build_current_day_body(params)
22
+ request_body = build_current_day_intra_body(params)
23
23
  signature_headers = generate_signature_headers(request_body)
24
24
 
25
25
  response = client.post(
@@ -33,9 +33,9 @@ module DkPaymentGateway
33
33
  end
34
34
 
35
35
  def check_current_day_inter(params)
36
- validate_current_day_params!(params)
36
+ validate_current_day_inter_params!(params)
37
37
 
38
- request_body = build_current_day_body(params)
38
+ request_body = build_current_day_inter_body(params)
39
39
  signature_headers = generate_signature_headers(request_body)
40
40
 
41
41
  response = client.post(
@@ -79,7 +79,7 @@ module DkPaymentGateway
79
79
 
80
80
  private
81
81
 
82
- def build_current_day_body(params)
82
+ def build_current_day_intra_body(params)
83
83
  {
84
84
  request_id: Utils.generate_request_id,
85
85
  reference_no: params[:reference_no],
@@ -87,6 +87,14 @@ module DkPaymentGateway
87
87
  }
88
88
  end
89
89
 
90
+ def build_current_day_inter_body(params)
91
+ {
92
+ request_id: Utils.generate_request_id,
93
+ transaction_id: params[:transaction_id],
94
+ bene_account_number: params[:bene_account_number]
95
+ }
96
+ end
97
+
90
98
  def build_previous_days_body(params)
91
99
  {
92
100
  request_id: Utils.generate_request_id,
@@ -96,7 +104,7 @@ module DkPaymentGateway
96
104
  }
97
105
  end
98
106
 
99
- def validate_current_day_params!(params)
107
+ def validate_current_day_intra_params!(params)
100
108
  required = %i[reference_no bene_account_number]
101
109
 
102
110
  missing = required.select { |key| params[key].nil? || params[key].to_s.empty? }
@@ -104,6 +112,14 @@ module DkPaymentGateway
104
112
  raise InvalidParameterError, "Missing required parameters: #{missing.join(', ')}" unless missing.empty?
105
113
  end
106
114
 
115
+ def validate_current_day_inter_params!(params)
116
+ required = %i[transaction_id bene_account_number]
117
+
118
+ missing = required.select { |key| params[key].nil? || params[key].to_s.empty? }
119
+
120
+ raise InvalidParameterError, "Missing required parameters: #{missing.join(', ')}" unless missing.empty?
121
+ end
122
+
107
123
  def validate_previous_days_params!(params)
108
124
  required = %i[transaction_id transaction_date bene_account_number]
109
125
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DkPaymentGateway
4
- VERSION = '1.0.4'
4
+ VERSION = '1.0.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dk_payment_gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tashi Dendup