ruby-gpwebpay 0.0.4 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gp_webpay/payment.rb +1 -1
- data/lib/gp_webpay/payment_attributes.rb +2 -1
- data/lib/gp_webpay/verification.rb +1 -1
- data/lib/gp_webpay/version.rb +1 -1
- data/lib/gp_webpay/web_services.rb +34 -24
- 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: 493b0cc82ddb5121dbc99cf6bed9a551353b05afd152170dfe17d5d01a62af82
|
4
|
+
data.tar.gz: 5e038735011db9cb45948a95abe68ecf4696ae6252ca25f4ab4182f0be030d6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b68c379ce06ba515c548602dd8fb7073882ecd277b80ca4fd080749cdb4c16fe220e8523d39162b99f9f217c153d4615a6792454f500d1955cdb74ea55fab57
|
7
|
+
data.tar.gz: ffa53f96c7b4ec84041311b3fc59b7869063013188320cb233343dc3ef9c399e5ef40524da1a73907998d82aedcf4e9e0b0c54c3ff2662f1cfc45e92c186fc7e
|
data/lib/gp_webpay/payment.rb
CHANGED
@@ -6,7 +6,7 @@ module GpWebpay
|
|
6
6
|
@payment_attributes = payment_attributes
|
7
7
|
GpWebpay.logger.info "Payment Attrs: #{@payment_attributes}"
|
8
8
|
@verification_attrs = verification_attrs
|
9
|
-
GpWebpay.logger.info "Verification Attrs: #{@verification_attrs}"
|
9
|
+
GpWebpay.logger.info "Verification Attrs: #{@verification_attrs}" if @verification_attrs
|
10
10
|
end
|
11
11
|
|
12
12
|
def verified_response?(params)
|
data/lib/gp_webpay/version.rb
CHANGED
@@ -71,39 +71,49 @@ module GpWebpay
|
|
71
71
|
hash_response = hash_response["#{first_lvl_key}"]
|
72
72
|
second_lvl_key = hash_response.keys.last
|
73
73
|
hash_response = hash_response["#{second_lvl_key}"]
|
74
|
+
GpWebpay.logger.info "Response: #{hash_response}"
|
74
75
|
GpWebpay::WebServices::Response.new(hash_response)
|
75
76
|
end
|
76
77
|
|
77
78
|
def request_attributes(type = "")
|
78
|
-
{
|
79
|
+
base_attributes = {
|
79
80
|
message_id: message_id(type),
|
80
81
|
merchant_number: config.merchant_number,
|
81
82
|
order_number: order_number,
|
82
|
-
merchant_order_number: merchant_order_number,
|
83
|
-
master_order_number: master_order_number,
|
84
|
-
amount: amount_in_cents,
|
85
|
-
capture_flag: capture_flag,
|
86
|
-
card_holder_name: card_holder.name,
|
87
|
-
card_holder_email: card_holder.email,
|
88
|
-
card_holder_phone_country: card_holder.phone_country,
|
89
|
-
card_holder_phone: card_holder.phone,
|
90
|
-
card_holder_mobile_phone_country: card_holder.mobile_phone_country,
|
91
|
-
card_holder_mobile_phone: card_holder.mobile_phone,
|
92
|
-
address_match: address_match,
|
93
|
-
billing_name: billing.name,
|
94
|
-
billing_address1: billing.address1,
|
95
|
-
billing_city: billing.city,
|
96
|
-
billing_postal_code: billing.postal_code,
|
97
|
-
billing_country: billing.country,
|
98
|
-
shipping_name: shipping.name,
|
99
|
-
shipping_address1: shipping.address1,
|
100
|
-
shipping_city: shipping.city,
|
101
|
-
shipping_postal_code: shipping.postal_code,
|
102
|
-
shipping_country: shipping.country,
|
103
83
|
digest: ws_verification(type).digest,
|
104
|
-
# Deprecated Attrs, will remove
|
105
|
-
currency: currency,
|
106
84
|
}
|
85
|
+
|
86
|
+
case type
|
87
|
+
when "processRegularSubscriptionPayment"
|
88
|
+
payment_attributes = {
|
89
|
+
merchant_order_number: merchant_order_number,
|
90
|
+
master_order_number: master_order_number,
|
91
|
+
amount: amount_in_cents,
|
92
|
+
capture_flag: capture_flag,
|
93
|
+
card_holder_name: card_holder.name,
|
94
|
+
card_holder_email: card_holder.email,
|
95
|
+
card_holder_phone_country: card_holder.phone_country,
|
96
|
+
card_holder_phone: card_holder.phone,
|
97
|
+
card_holder_mobile_phone_country: card_holder.mobile_phone_country,
|
98
|
+
card_holder_mobile_phone: card_holder.mobile_phone,
|
99
|
+
address_match: address_match,
|
100
|
+
billing_name: billing.name,
|
101
|
+
billing_address1: billing.address1,
|
102
|
+
billing_city: billing.city,
|
103
|
+
billing_postal_code: billing.postal_code,
|
104
|
+
billing_country: billing.country,
|
105
|
+
shipping_name: shipping.name,
|
106
|
+
shipping_address1: shipping.address1,
|
107
|
+
shipping_city: shipping.city,
|
108
|
+
shipping_postal_code: shipping.postal_code,
|
109
|
+
shipping_country: shipping.country,
|
110
|
+
# Deprecated Attrs, will remove
|
111
|
+
currency: currency,
|
112
|
+
}
|
113
|
+
base_attributes.merge(payment_attributes)
|
114
|
+
else
|
115
|
+
base_attributes
|
116
|
+
end
|
107
117
|
end
|
108
118
|
|
109
119
|
def config
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-gpwebpay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrej Antas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|