zaui_zapi 0.2.8 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/version.rb +1 -1
- data/lib/zapi_xml.rb +2 -2
- data/lib/zaui.rb +15 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cba204364fcee1842b430552d3197106ebc62555
|
4
|
+
data.tar.gz: d6e34db8a91f7efa0f823470e334a2f2440527be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29409baf9fa3d7f68397cf66536f5a69cfe25ebe835e6a665392985a180af0eaa42b415d3f1ac701a113885e7babe6568416bc48cb7d73f6fe08b5fef35406d4
|
7
|
+
data.tar.gz: d22ffacad53ff19134513d2f60b14131f044b28bd3511df093b41923e78edf1541360880b7d9e03ee7d1d2cbf1ac176ae703edee660978b4fb01b22d014642b0
|
data/lib/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VERSION = '0.
|
1
|
+
VERSION = '0.3.0'
|
data/lib/zapi_xml.rb
CHANGED
@@ -271,12 +271,12 @@ class ZapiXML
|
|
271
271
|
})
|
272
272
|
end
|
273
273
|
|
274
|
-
def process_cart_with_payment hash:
|
274
|
+
def process_cart_with_payment hash:, paymentMethodType:
|
275
275
|
_wrap_xml_request({
|
276
276
|
"methodName" => 'zapiProcessCartWithPayment',
|
277
277
|
"cartId" => session.cart_id,
|
278
278
|
"paymentMethod" => {
|
279
|
-
"paymentMethodType" =>
|
279
|
+
"paymentMethodType" => paymentMethodType
|
280
280
|
},
|
281
281
|
"paymentGatewayId" => nil,
|
282
282
|
"creditCardDetails" => {
|
data/lib/zaui.rb
CHANGED
@@ -104,15 +104,21 @@ class Zaui
|
|
104
104
|
raw = _zapi(xml.promotion_code_apply(promo_code: code))
|
105
105
|
end
|
106
106
|
|
107
|
-
def process_cart_with_payment hash: {}
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
107
|
+
def process_cart_with_payment hash: {}, paymentMethodType: 2000
|
108
|
+
case paymentMethodType
|
109
|
+
when 2000
|
110
|
+
cart_data = {
|
111
|
+
name_on_card: hash[:name_on_card],
|
112
|
+
cc_num: hash[:cc_num].gsub(/[^\d]/, ''),
|
113
|
+
expiration_month: hash[:expiration_month],
|
114
|
+
expiration_year: hash[:expiration_year],
|
115
|
+
csv: hash[:csv]
|
116
|
+
}
|
117
|
+
when 2003
|
118
|
+
cart_data = {}
|
119
|
+
end
|
120
|
+
|
121
|
+
raw = _zapi(xml.process_cart_with_payment(hash: cart_data, paymentMethodType: paymentMethodType))
|
116
122
|
end
|
117
123
|
|
118
124
|
def process_single_transaction hash: {}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zaui_zapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Kretzmann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|