activemerchant 1.79.2 → 1.129.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG +1391 -0
- data/README.md +29 -14
- data/lib/active_merchant/billing/avs_result.rb +25 -28
- data/lib/active_merchant/billing/base.rb +0 -13
- data/lib/active_merchant/billing/check.rb +55 -22
- data/lib/active_merchant/billing/compatibility.rb +10 -12
- data/lib/active_merchant/billing/credit_card.rb +82 -62
- data/lib/active_merchant/billing/credit_card_formatting.rb +4 -4
- data/lib/active_merchant/billing/credit_card_methods.rb +328 -58
- data/lib/active_merchant/billing/cvv_result.rb +0 -1
- data/lib/active_merchant/billing/gateway.rb +61 -56
- data/lib/active_merchant/billing/gateways/adyen.rb +562 -87
- data/lib/active_merchant/billing/gateways/airwallex.rb +370 -0
- data/lib/active_merchant/billing/gateways/alelo.rb +256 -0
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +35 -36
- data/lib/active_merchant/billing/gateways/authorize_net.rb +297 -196
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +31 -24
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +94 -98
- data/lib/active_merchant/billing/gateways/axcessms.rb +64 -66
- data/lib/active_merchant/billing/gateways/balanced.rb +72 -65
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +222 -0
- data/lib/active_merchant/billing/gateways/bank_frick.rb +16 -16
- data/lib/active_merchant/billing/gateways/banwire.rb +12 -12
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +140 -69
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +7 -7
- data/lib/active_merchant/billing/gateways/be2bill.rb +7 -7
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +115 -115
- data/lib/active_merchant/billing/gateways/beanstream.rb +39 -13
- data/lib/active_merchant/billing/gateways/beanstream_interac.rb +1 -2
- data/lib/active_merchant/billing/gateways/blue_pay.rb +87 -58
- data/lib/active_merchant/billing/gateways/blue_snap.rb +405 -104
- data/lib/active_merchant/billing/gateways/bogus.rb +34 -30
- data/lib/active_merchant/billing/gateways/borgun.rb +97 -47
- data/lib/active_merchant/billing/gateways/bpoint.rb +20 -20
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +9 -3
- data/lib/active_merchant/billing/gateways/braintree/token_nonce.rb +113 -0
- data/lib/active_merchant/billing/gateways/braintree.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +561 -259
- data/lib/active_merchant/billing/gateways/braintree_orange.rb +1 -1
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +53 -54
- data/lib/active_merchant/billing/gateways/cams.rb +31 -31
- data/lib/active_merchant/billing/gateways/card_connect.rb +85 -33
- data/lib/active_merchant/billing/gateways/card_save.rb +7 -9
- data/lib/active_merchant/billing/gateways/card_stream.rb +187 -169
- data/lib/active_merchant/billing/gateways/cardknox.rb +24 -25
- data/lib/active_merchant/billing/gateways/cardprocess.rb +9 -7
- data/lib/active_merchant/billing/gateways/cashnet.rb +43 -27
- data/lib/active_merchant/billing/gateways/cc5.rb +14 -17
- data/lib/active_merchant/billing/gateways/cecabank.rb +62 -52
- data/lib/active_merchant/billing/gateways/cenpos.rb +63 -62
- data/lib/active_merchant/billing/gateways/checkout.rb +21 -23
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +391 -113
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -3
- data/lib/active_merchant/billing/gateways/clearhaus.rb +40 -41
- data/lib/active_merchant/billing/gateways/commerce_hub.rb +361 -0
- data/lib/active_merchant/billing/gateways/commercegate.rb +11 -12
- data/lib/active_merchant/billing/gateways/conekta.rb +35 -30
- data/lib/active_merchant/billing/gateways/creditcall.rb +59 -59
- data/lib/active_merchant/billing/gateways/credorax.rb +326 -145
- data/lib/active_merchant/billing/gateways/ct_payment.rb +269 -0
- data/lib/active_merchant/billing/gateways/culqi.rb +53 -53
- data/lib/active_merchant/billing/gateways/cyber_source/cyber_source_common.rb +36 -0
- data/lib/active_merchant/billing/gateways/cyber_source.rb +566 -208
- data/lib/active_merchant/billing/gateways/cyber_source_rest.rb +456 -0
- data/lib/active_merchant/billing/gateways/d_local.rb +342 -0
- data/lib/active_merchant/billing/gateways/data_cash.rb +40 -56
- data/lib/active_merchant/billing/gateways/decidir.rb +358 -0
- data/lib/active_merchant/billing/gateways/decidir_plus.rb +344 -0
- data/lib/active_merchant/billing/gateways/dibs.rb +34 -40
- data/lib/active_merchant/billing/gateways/digitzs.rb +48 -45
- data/lib/active_merchant/billing/gateways/ebanx.rb +110 -60
- data/lib/active_merchant/billing/gateways/efsnet.rb +46 -50
- data/lib/active_merchant/billing/gateways/elavon.rb +351 -189
- data/lib/active_merchant/billing/gateways/element.rb +106 -56
- data/lib/active_merchant/billing/gateways/epay.rb +74 -64
- data/lib/active_merchant/billing/gateways/evo_ca.rb +13 -14
- data/lib/active_merchant/billing/gateways/eway.rb +74 -73
- data/lib/active_merchant/billing/gateways/eway_managed.rb +85 -87
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +105 -60
- data/lib/active_merchant/billing/gateways/exact.rb +29 -37
- data/lib/active_merchant/billing/gateways/ezic.rb +21 -22
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +70 -48
- data/lib/active_merchant/billing/gateways/federated_canada.rb +11 -13
- data/lib/active_merchant/billing/gateways/finansbank.rb +3 -4
- data/lib/active_merchant/billing/gateways/first_giving.rb +23 -23
- data/lib/active_merchant/billing/gateways/first_pay.rb +33 -13
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +106 -105
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +505 -0
- data/lib/active_merchant/billing/gateways/flo2cash.rb +36 -36
- data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +2 -2
- data/lib/active_merchant/billing/gateways/forte.rb +70 -40
- data/lib/active_merchant/billing/gateways/garanti.rb +24 -31
- data/lib/active_merchant/billing/gateways/global_collect.rb +378 -154
- data/lib/active_merchant/billing/gateways/global_transport.rb +12 -13
- data/lib/active_merchant/billing/gateways/hdfc.rb +55 -57
- data/lib/active_merchant/billing/gateways/hps.rb +236 -69
- data/lib/active_merchant/billing/gateways/iats_payments.rb +61 -39
- data/lib/active_merchant/billing/gateways/in_context_paypal_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/inspire.rb +41 -47
- data/lib/active_merchant/billing/gateways/instapay.rb +10 -14
- data/lib/active_merchant/billing/gateways/ipg.rb +420 -0
- data/lib/active_merchant/billing/gateways/ipp.rb +25 -24
- data/lib/active_merchant/billing/gateways/iridium.rb +243 -244
- data/lib/active_merchant/billing/gateways/itransact.rb +14 -14
- data/lib/active_merchant/billing/gateways/iveri.rb +73 -34
- data/lib/active_merchant/billing/gateways/ixopay.rb +320 -0
- data/lib/active_merchant/billing/gateways/jetpay.rb +145 -152
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +154 -159
- data/lib/active_merchant/billing/gateways/komoju.rb +16 -16
- data/lib/active_merchant/billing/gateways/kushki.rb +127 -57
- data/lib/active_merchant/billing/gateways/latitude19.rb +111 -115
- data/lib/active_merchant/billing/gateways/linkpoint.rb +82 -85
- data/lib/active_merchant/billing/gateways/litle.rb +247 -53
- data/lib/active_merchant/billing/gateways/mastercard.rb +41 -23
- data/lib/active_merchant/billing/gateways/maxipago.rb +5 -5
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +135 -49
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +62 -29
- data/lib/active_merchant/billing/gateways/merchant_one.rb +16 -20
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +40 -40
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +54 -60
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +42 -44
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +52 -14
- data/lib/active_merchant/billing/gateways/mercury.rb +47 -51
- data/lib/active_merchant/billing/gateways/metrics_global.rb +32 -42
- data/lib/active_merchant/billing/gateways/micropayment.rb +42 -45
- data/lib/active_merchant/billing/gateways/migs/migs_codes.rb +7 -7
- data/lib/active_merchant/billing/gateways/migs.rb +45 -40
- data/lib/active_merchant/billing/gateways/mit.rb +260 -0
- data/lib/active_merchant/billing/gateways/modern_payments.rb +2 -2
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +29 -31
- data/lib/active_merchant/billing/gateways/moka.rb +290 -0
- data/lib/active_merchant/billing/gateways/monei.rb +255 -138
- data/lib/active_merchant/billing/gateways/moneris.rb +226 -88
- data/lib/active_merchant/billing/gateways/money_movers.rb +11 -13
- data/lib/active_merchant/billing/gateways/mundipagg.rb +117 -43
- data/lib/active_merchant/billing/gateways/nab_transact.rb +28 -31
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +13 -15
- data/lib/active_merchant/billing/gateways/net_registry.rb +12 -12
- data/lib/active_merchant/billing/gateways/netaxept.rb +33 -34
- data/lib/active_merchant/billing/gateways/netbanx.rb +167 -80
- data/lib/active_merchant/billing/gateways/netbilling.rb +27 -30
- data/lib/active_merchant/billing/gateways/netpay.rb +10 -10
- data/lib/active_merchant/billing/gateways/network_merchants.rb +7 -11
- data/lib/active_merchant/billing/gateways/nmi.rb +134 -48
- data/lib/active_merchant/billing/gateways/ogone.rb +88 -58
- data/lib/active_merchant/billing/gateways/omise.rb +30 -31
- data/lib/active_merchant/billing/gateways/openpay.rb +45 -26
- data/lib/active_merchant/billing/gateways/opp.rb +166 -144
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +67 -64
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +5 -7
- data/lib/active_merchant/billing/gateways/orbital.rb +726 -382
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +26 -27
- data/lib/active_merchant/billing/gateways/pagarme.rb +47 -56
- data/lib/active_merchant/billing/gateways/pago_facil.rb +12 -14
- data/lib/active_merchant/billing/gateways/pay_arc.rb +392 -0
- data/lib/active_merchant/billing/gateways/pay_conex.rb +39 -40
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +65 -65
- data/lib/active_merchant/billing/gateways/pay_hub.rb +39 -39
- data/lib/active_merchant/billing/gateways/pay_junction.rb +37 -37
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +70 -54
- data/lib/active_merchant/billing/gateways/pay_secure.rb +15 -17
- data/lib/active_merchant/billing/gateways/pay_trace.rb +450 -0
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +71 -47
- data/lib/active_merchant/billing/gateways/payeezy.rb +159 -32
- data/lib/active_merchant/billing/gateways/payex.rb +39 -42
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +41 -36
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +11 -8
- data/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +3 -3
- data/lib/active_merchant/billing/gateways/payflow.rb +178 -54
- data/lib/active_merchant/billing/gateways/payflow_express.rb +61 -65
- data/lib/active_merchant/billing/gateways/payflow_express_uk.rb +0 -1
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +1 -2
- data/lib/active_merchant/billing/gateways/payment_express.rb +66 -58
- data/lib/active_merchant/billing/gateways/paymentez.rb +114 -25
- data/lib/active_merchant/billing/gateways/paymill.rb +134 -133
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +2 -1
- data/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb +4 -0
- data/lib/active_merchant/billing/gateways/paypal.rb +27 -14
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +2 -2
- data/lib/active_merchant/billing/gateways/paypal_express.rb +5 -2
- data/lib/active_merchant/billing/gateways/paypal_express_common.rb +1 -1
- data/lib/active_merchant/billing/gateways/paysafe.rb +420 -0
- data/lib/active_merchant/billing/gateways/payscout.rb +10 -13
- data/lib/active_merchant/billing/gateways/paystation.rb +79 -82
- data/lib/active_merchant/billing/gateways/payu_in.rb +59 -58
- data/lib/active_merchant/billing/gateways/payu_latam.rb +139 -97
- data/lib/active_merchant/billing/gateways/payway.rb +27 -27
- data/lib/active_merchant/billing/gateways/payway_dot_com.rb +253 -0
- data/lib/active_merchant/billing/gateways/pin.rb +87 -34
- data/lib/active_merchant/billing/gateways/plexo.rb +308 -0
- data/lib/active_merchant/billing/gateways/plugnpay.rb +82 -82
- data/lib/active_merchant/billing/gateways/priority.rb +392 -0
- data/lib/active_merchant/billing/gateways/pro_pay.rb +139 -140
- data/lib/active_merchant/billing/gateways/psigate.rb +44 -44
- data/lib/active_merchant/billing/gateways/psl_card.rb +29 -37
- data/lib/active_merchant/billing/gateways/qbms.rb +75 -76
- data/lib/active_merchant/billing/gateways/quantum.rb +21 -23
- data/lib/active_merchant/billing/gateways/quickbooks.rb +142 -55
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +103 -107
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +156 -158
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +7 -8
- data/lib/active_merchant/billing/gateways/quickpay.rb +1 -3
- data/lib/active_merchant/billing/gateways/qvalent.rb +137 -68
- data/lib/active_merchant/billing/gateways/rapyd.rb +319 -0
- data/lib/active_merchant/billing/gateways/reach.rb +277 -0
- data/lib/active_merchant/billing/gateways/realex.rb +132 -50
- data/lib/active_merchant/billing/gateways/redsys.rb +382 -186
- data/lib/active_merchant/billing/gateways/s5.rb +16 -16
- data/lib/active_merchant/billing/gateways/safe_charge.rb +83 -47
- data/lib/active_merchant/billing/gateways/sage.rb +49 -48
- data/lib/active_merchant/billing/gateways/sage_pay.rb +76 -83
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +13 -15
- data/lib/active_merchant/billing/gateways/secure_net.rb +32 -40
- data/lib/active_merchant/billing/gateways/secure_pay.rb +30 -40
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +23 -26
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +14 -16
- data/lib/active_merchant/billing/gateways/securion_pay.rb +69 -31
- data/lib/active_merchant/billing/gateways/shift4.rb +342 -0
- data/lib/active_merchant/billing/gateways/simetrik.rb +368 -0
- data/lib/active_merchant/billing/gateways/skip_jack.rb +52 -53
- data/lib/active_merchant/billing/gateways/smart_ps.rb +51 -60
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +29 -29
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +66 -47
- data/lib/active_merchant/billing/gateways/stripe.rb +309 -148
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +556 -0
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +18 -23
- data/lib/active_merchant/billing/gateways/telr.rb +46 -48
- data/lib/active_merchant/billing/gateways/tns.rb +8 -7
- data/lib/active_merchant/billing/gateways/trans_first.rb +37 -37
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +249 -245
- data/lib/active_merchant/billing/gateways/transact_pro.rb +25 -27
- data/lib/active_merchant/billing/gateways/transax.rb +6 -8
- data/lib/active_merchant/billing/gateways/transnational.rb +1 -2
- data/lib/active_merchant/billing/gateways/trexle.rb +22 -18
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +161 -88
- data/lib/active_merchant/billing/gateways/usa_epay.rb +5 -6
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +231 -238
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +129 -55
- data/lib/active_merchant/billing/gateways/vanco.rb +42 -33
- data/lib/active_merchant/billing/gateways/verifi.rb +52 -53
- data/lib/active_merchant/billing/gateways/viaklix.rb +18 -22
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +115 -74
- data/lib/active_merchant/billing/gateways/vpos.rb +223 -0
- data/lib/active_merchant/billing/gateways/webpay.rb +9 -9
- data/lib/active_merchant/billing/gateways/wepay.rb +38 -41
- data/lib/active_merchant/billing/gateways/wirecard.rb +36 -37
- data/lib/active_merchant/billing/gateways/wompi.rb +197 -0
- data/lib/active_merchant/billing/gateways/world_net.rb +39 -38
- data/lib/active_merchant/billing/gateways/worldpay.rb +756 -142
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +73 -83
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +31 -31
- data/lib/active_merchant/billing/model.rb +2 -2
- data/lib/active_merchant/billing/network_tokenization_credit_card.rb +3 -3
- data/lib/active_merchant/billing/rails.rb +1 -1
- data/lib/active_merchant/billing/response.rb +32 -13
- data/lib/active_merchant/billing/three_d_secure_eci_mapper.rb +27 -0
- data/lib/active_merchant/billing.rb +1 -0
- data/lib/active_merchant/connection.rb +24 -38
- data/lib/active_merchant/country.rb +9 -5
- data/lib/active_merchant/errors.rb +4 -1
- data/lib/active_merchant/net_http_ssl_connection.rb +2 -0
- data/lib/active_merchant/network_connection_retries.rb +28 -31
- data/lib/active_merchant/post_data.rb +5 -3
- data/lib/active_merchant/posts_data.rb +5 -7
- data/lib/active_merchant/version.rb +1 -1
- data/lib/active_merchant.rb +3 -3
- data/lib/activemerchant.rb +1 -1
- data/lib/certs/cacert.pem +1592 -2329
- data/lib/support/gateway_support.rb +8 -10
- data/lib/support/ssl_verify.rb +9 -14
- data/lib/support/ssl_version.rb +9 -10
- metadata +98 -37
- data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +0 -246
- data/lib/active_merchant/billing/gateways/ideal/ideal_rabobank.pem +0 -13
- data/lib/active_merchant/billing/gateways/ideal/ideal_response.rb +0 -29
- data/lib/active_merchant/billing/gateways/ideal_rabobank.rb +0 -66
- data/lib/active_merchant/billing/gateways/moneris_us.rb +0 -309
@@ -36,7 +36,7 @@ module ActiveMerchant #:nodoc:
|
|
36
36
|
self.live_url = 'https://secure.evoepay.com/api/transact.php'
|
37
37
|
|
38
38
|
self.supported_countries = ['CA']
|
39
|
-
self.supported_cardtypes = [
|
39
|
+
self.supported_cardtypes = %i[visa master american_express jcb discover]
|
40
40
|
self.money_format = :dollars
|
41
41
|
self.homepage_url = 'http://www.evocanada.com/'
|
42
42
|
self.display_name = 'EVO Canada'
|
@@ -139,8 +139,8 @@ module ActiveMerchant #:nodoc:
|
|
139
139
|
# <tt>options</tt>.
|
140
140
|
def capture(money, authorization, options = {})
|
141
141
|
post = {
|
142
|
-
:
|
143
|
-
:
|
142
|
+
amount: amount(money),
|
143
|
+
transactionid: authorization
|
144
144
|
}
|
145
145
|
add_order(post, options)
|
146
146
|
commit('capture', money, post)
|
@@ -153,7 +153,7 @@ module ActiveMerchant #:nodoc:
|
|
153
153
|
# The <tt>identification</tt> parameter is the transaction ID, retrieved
|
154
154
|
# from {Response#authorization}.
|
155
155
|
def refund(money, identification)
|
156
|
-
post = {:
|
156
|
+
post = { transactionid: identification }
|
157
157
|
commit('refund', money, post)
|
158
158
|
end
|
159
159
|
|
@@ -181,7 +181,7 @@ module ActiveMerchant #:nodoc:
|
|
181
181
|
# The <tt>identification</tt> parameter is the transaction ID, retrieved
|
182
182
|
# from {Response#authorization}.
|
183
183
|
def void(identification)
|
184
|
-
post = {:
|
184
|
+
post = { transactionid: identification }
|
185
185
|
commit('void', nil, post)
|
186
186
|
end
|
187
187
|
|
@@ -192,7 +192,7 @@ module ActiveMerchant #:nodoc:
|
|
192
192
|
# The <tt>identification</tt> parameter is the transaction ID, retrieved
|
193
193
|
# from {Response#authorization}.
|
194
194
|
def update(identification, options)
|
195
|
-
post = {:
|
195
|
+
post = { transactionid: identification }
|
196
196
|
add_order(post, options)
|
197
197
|
commit('update', nil, post)
|
198
198
|
end
|
@@ -245,7 +245,7 @@ module ActiveMerchant #:nodoc:
|
|
245
245
|
end
|
246
246
|
|
247
247
|
def add_paymentmethod(post, payment)
|
248
|
-
if card_brand(payment)=='check'
|
248
|
+
if card_brand(payment) == 'check'
|
249
249
|
post[:payment] = 'check'
|
250
250
|
post[:checkname] = payment.name
|
251
251
|
post[:checkaba] = payment.routing_number
|
@@ -280,11 +280,10 @@ module ActiveMerchant #:nodoc:
|
|
280
280
|
message = message_from(response)
|
281
281
|
|
282
282
|
Response.new(success?(response), message, response,
|
283
|
-
:
|
284
|
-
:
|
285
|
-
:
|
286
|
-
:
|
287
|
-
)
|
283
|
+
test: test?,
|
284
|
+
authorization: response['transactionid'],
|
285
|
+
avs_result: { code: response['avsresponse'] },
|
286
|
+
cvv_result: response['cvvresponse'])
|
288
287
|
end
|
289
288
|
|
290
289
|
def message_from(response)
|
@@ -292,7 +291,7 @@ module ActiveMerchant #:nodoc:
|
|
292
291
|
end
|
293
292
|
|
294
293
|
def post_data(action, parameters = {})
|
295
|
-
post = {:
|
294
|
+
post = { type: action }
|
296
295
|
|
297
296
|
if test?
|
298
297
|
post[:username] = 'demo'
|
@@ -301,7 +300,7 @@ module ActiveMerchant #:nodoc:
|
|
301
300
|
post[:username] = options[:username]
|
302
301
|
post[:password] = options[:password]
|
303
302
|
end
|
304
|
-
post.merge(parameters).collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" unless value.nil? }.compact.join(
|
303
|
+
post.merge(parameters).collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" unless value.nil? }.compact.join('&')
|
305
304
|
end
|
306
305
|
end
|
307
306
|
end
|
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
|
10
10
|
self.money_format = :cents
|
11
11
|
self.supported_countries = ['AU']
|
12
|
-
self.supported_cardtypes = [
|
12
|
+
self.supported_cardtypes = %i[visa master american_express diners_club]
|
13
13
|
self.homepage_url = 'http://www.eway.com.au/'
|
14
14
|
self.display_name = 'eWAY'
|
15
15
|
|
@@ -38,7 +38,7 @@ module ActiveMerchant #:nodoc:
|
|
38
38
|
commit(purchase_url(post[:CVN]), money, post)
|
39
39
|
end
|
40
40
|
|
41
|
-
def refund(money, authorization, options={})
|
41
|
+
def refund(money, authorization, options = {})
|
42
42
|
post = {}
|
43
43
|
|
44
44
|
add_customer_id(post)
|
@@ -64,14 +64,15 @@ module ActiveMerchant #:nodoc:
|
|
64
64
|
end
|
65
65
|
|
66
66
|
private
|
67
|
+
|
67
68
|
def requires_address!(options)
|
68
|
-
raise ArgumentError.new(
|
69
|
+
raise ArgumentError.new('Missing eWay required parameters: address or billing_address') unless options.has_key?(:address) || options.has_key?(:billing_address)
|
69
70
|
end
|
70
71
|
|
71
72
|
def add_creditcard(post, creditcard)
|
72
|
-
post[:CardNumber]
|
73
|
-
post[:CardExpiryMonth]
|
74
|
-
post[:CardExpiryYear] = sprintf(
|
73
|
+
post[:CardNumber] = creditcard.number
|
74
|
+
post[:CardExpiryMonth] = sprintf('%.2i', creditcard.month)
|
75
|
+
post[:CardExpiryYear] = sprintf('%.4i', creditcard.year)[-2..-1]
|
75
76
|
post[:CustomerFirstName] = creditcard.first_name
|
76
77
|
post[:CustomerLastName] = creditcard.last_name
|
77
78
|
post[:CardHoldersName] = creditcard.name
|
@@ -81,7 +82,7 @@ module ActiveMerchant #:nodoc:
|
|
81
82
|
|
82
83
|
def add_address(post, options)
|
83
84
|
if address = options[:billing_address] || options[:address]
|
84
|
-
post[:CustomerAddress] = [
|
85
|
+
post[:CustomerAddress] = [address[:address1], address[:address2], address[:city], address[:state], address[:country]].compact.join(', ')
|
85
86
|
post[:CustomerPostcode] = address[:zip]
|
86
87
|
end
|
87
88
|
end
|
@@ -113,13 +114,12 @@ module ActiveMerchant #:nodoc:
|
|
113
114
|
Response.new(success?(response),
|
114
115
|
message_from(response[:ewaytrxnerror]),
|
115
116
|
response,
|
116
|
-
:
|
117
|
-
:
|
118
|
-
)
|
117
|
+
authorization: response[:ewaytrxnnumber],
|
118
|
+
test: test?)
|
119
119
|
end
|
120
120
|
|
121
121
|
def success?(response)
|
122
|
-
response[:ewaytrxnstatus] ==
|
122
|
+
response[:ewaytrxnstatus] == 'True'
|
123
123
|
end
|
124
124
|
|
125
125
|
def parse(xml)
|
@@ -134,7 +134,7 @@ module ActiveMerchant #:nodoc:
|
|
134
134
|
|
135
135
|
def post_data(parameters = {})
|
136
136
|
xml = REXML::Document.new
|
137
|
-
root = xml.add_element(
|
137
|
+
root = xml.add_element('ewaygateway')
|
138
138
|
|
139
139
|
parameters.each do |key, value|
|
140
140
|
root.add_element("eway#{key}").text = value
|
@@ -144,7 +144,8 @@ module ActiveMerchant #:nodoc:
|
|
144
144
|
|
145
145
|
def message_from(message)
|
146
146
|
return '' if message.blank?
|
147
|
-
|
147
|
+
|
148
|
+
MESSAGES[message[0, 2]] || message
|
148
149
|
end
|
149
150
|
|
150
151
|
def purchase_url(cvn)
|
@@ -159,66 +160,66 @@ module ActiveMerchant #:nodoc:
|
|
159
160
|
end
|
160
161
|
|
161
162
|
MESSAGES = {
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
163
|
+
'00' => 'Transaction Approved',
|
164
|
+
'01' => 'Refer to Issuer',
|
165
|
+
'02' => 'Refer to Issuer, special',
|
166
|
+
'03' => 'No Merchant',
|
167
|
+
'04' => 'Pick Up Card',
|
168
|
+
'05' => 'Do Not Honour',
|
169
|
+
'06' => 'Error',
|
170
|
+
'07' => 'Pick Up Card, Special',
|
171
|
+
'08' => 'Honour With Identification',
|
172
|
+
'09' => 'Request In Progress',
|
173
|
+
'10' => 'Approved For Partial Amount',
|
174
|
+
'11' => 'Approved, VIP',
|
175
|
+
'12' => 'Invalid Transaction',
|
176
|
+
'13' => 'Invalid Amount',
|
177
|
+
'14' => 'Invalid Card Number',
|
178
|
+
'15' => 'No Issuer',
|
179
|
+
'16' => 'Approved, Update Track 3',
|
180
|
+
'19' => 'Re-enter Last Transaction',
|
181
|
+
'21' => 'No Action Taken',
|
182
|
+
'22' => 'Suspected Malfunction',
|
183
|
+
'23' => 'Unacceptable Transaction Fee',
|
184
|
+
'25' => 'Unable to Locate Record On File',
|
185
|
+
'30' => 'Format Error',
|
186
|
+
'31' => 'Bank Not Supported By Switch',
|
187
|
+
'33' => 'Expired Card, Capture',
|
188
|
+
'34' => 'Suspected Fraud, Retain Card',
|
189
|
+
'35' => 'Card Acceptor, Contact Acquirer, Retain Card',
|
190
|
+
'36' => 'Restricted Card, Retain Card',
|
191
|
+
'37' => 'Contact Acquirer Security Department, Retain Card',
|
192
|
+
'38' => 'PIN Tries Exceeded, Capture',
|
193
|
+
'39' => 'No Credit Account',
|
194
|
+
'40' => 'Function Not Supported',
|
195
|
+
'41' => 'Lost Card',
|
196
|
+
'42' => 'No Universal Account',
|
197
|
+
'43' => 'Stolen Card',
|
198
|
+
'44' => 'No Investment Account',
|
199
|
+
'51' => 'Insufficient Funds',
|
200
|
+
'52' => 'No Cheque Account',
|
201
|
+
'53' => 'No Savings Account',
|
202
|
+
'54' => 'Expired Card',
|
203
|
+
'55' => 'Incorrect PIN',
|
204
|
+
'56' => 'No Card Record',
|
205
|
+
'57' => 'Function Not Permitted to Cardholder',
|
206
|
+
'58' => 'Function Not Permitted to Terminal',
|
207
|
+
'59' => 'Suspected Fraud',
|
208
|
+
'60' => 'Acceptor Contact Acquirer',
|
209
|
+
'61' => 'Exceeds Withdrawal Limit',
|
210
|
+
'62' => 'Restricted Card',
|
211
|
+
'63' => 'Security Violation',
|
212
|
+
'64' => 'Original Amount Incorrect',
|
213
|
+
'66' => 'Acceptor Contact Acquirer, Security',
|
214
|
+
'67' => 'Capture Card',
|
215
|
+
'75' => 'PIN Tries Exceeded',
|
216
|
+
'82' => 'CVV Validation Error',
|
217
|
+
'90' => 'Cutoff In Progress',
|
218
|
+
'91' => 'Card Issuer Unavailable',
|
219
|
+
'92' => 'Unable To Route Transaction',
|
220
|
+
'93' => 'Cannot Complete, Violation Of The Law',
|
221
|
+
'94' => 'Duplicate Transaction',
|
222
|
+
'96' => 'System Error'
|
222
223
|
}
|
223
224
|
end
|
224
225
|
end
|
@@ -8,11 +8,11 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
self.supported_countries = ['AU']
|
9
9
|
|
10
10
|
# The card types supported by the payment gateway
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master]
|
12
12
|
|
13
13
|
self.default_currency = 'AUD'
|
14
14
|
|
15
|
-
#accepted money format
|
15
|
+
# accepted money format
|
16
16
|
self.money_format = :cents
|
17
17
|
|
18
18
|
# The homepage URL of the gateway
|
@@ -46,10 +46,10 @@ module ActiveMerchant #:nodoc:
|
|
46
46
|
add_address(post, billing_address)
|
47
47
|
add_misc_fields(post, options)
|
48
48
|
|
49
|
-
commit(
|
49
|
+
commit('CreateCustomer', post)
|
50
50
|
end
|
51
51
|
|
52
|
-
def update(billing_id, creditcard, options={})
|
52
|
+
def update(billing_id, creditcard, options = {})
|
53
53
|
post = {}
|
54
54
|
|
55
55
|
# Handle our required fields
|
@@ -59,12 +59,12 @@ module ActiveMerchant #:nodoc:
|
|
59
59
|
billing_address = options[:billing_address]
|
60
60
|
eway_requires!(billing_address)
|
61
61
|
|
62
|
-
post[:managedCustomerID]=billing_id
|
62
|
+
post[:managedCustomerID] = billing_id
|
63
63
|
add_creditcard(post, creditcard)
|
64
64
|
add_address(post, billing_address)
|
65
65
|
add_misc_fields(post, options)
|
66
66
|
|
67
|
-
commit(
|
67
|
+
commit('UpdateCustomer', post)
|
68
68
|
end
|
69
69
|
|
70
70
|
# Process a payment in the given amount against the stored credit card given by billing_id
|
@@ -80,13 +80,13 @@ module ActiveMerchant #:nodoc:
|
|
80
80
|
# * <tt>:order_id</tt> -- The order number, passed to eWay as the "Invoice Reference"
|
81
81
|
# * <tt>:invoice</tt> -- The invoice number, passed to eWay as the "Invoice Reference" unless :order_id is also given
|
82
82
|
# * <tt>:description</tt> -- A description of the payment, passed to eWay as the "Invoice Description"
|
83
|
-
def purchase(money, billing_id, options={})
|
83
|
+
def purchase(money, billing_id, options = {})
|
84
84
|
post = {}
|
85
85
|
post[:managedCustomerID] = billing_id.to_s
|
86
|
-
post[:amount]=money
|
86
|
+
post[:amount] = money
|
87
87
|
add_invoice(post, options)
|
88
88
|
|
89
|
-
commit(
|
89
|
+
commit('ProcessPayment', post)
|
90
90
|
end
|
91
91
|
|
92
92
|
# Get customer's stored credit card details given by billing_id
|
@@ -98,7 +98,7 @@ module ActiveMerchant #:nodoc:
|
|
98
98
|
post = {}
|
99
99
|
post[:managedCustomerID] = billing_id.to_s
|
100
100
|
|
101
|
-
commit(
|
101
|
+
commit('QueryCustomer', post)
|
102
102
|
end
|
103
103
|
|
104
104
|
# TODO: eWay API also provides QueryPayment
|
@@ -106,8 +106,8 @@ module ActiveMerchant #:nodoc:
|
|
106
106
|
private
|
107
107
|
|
108
108
|
def eway_requires!(hash)
|
109
|
-
raise ArgumentError.new(
|
110
|
-
raise ArgumentError.new(
|
109
|
+
raise ArgumentError.new('Missing eWay required parameter in `billing_address`: title') unless hash.has_key?(:title)
|
110
|
+
raise ArgumentError.new('Missing eWay required parameter in `billing_address`: country') unless hash.has_key?(:country)
|
111
111
|
end
|
112
112
|
|
113
113
|
def add_address(post, address)
|
@@ -122,13 +122,13 @@ module ActiveMerchant #:nodoc:
|
|
122
122
|
end
|
123
123
|
|
124
124
|
def add_misc_fields(post, options)
|
125
|
-
post[:CustomerRef]=options[:billing_address][:customer_ref] || options[:customer]
|
126
|
-
post[:Title]=options[:billing_address][:title]
|
127
|
-
post[:Company]=options[:billing_address][:company]
|
128
|
-
post[:JobDesc]=options[:billing_address][:job_desc]
|
129
|
-
post[:Email]=options[:billing_address][:email] || options[:email]
|
130
|
-
post[:URL]=options[:billing_address][:url]
|
131
|
-
post[:Comments]=options[:description]
|
125
|
+
post[:CustomerRef] = options[:billing_address][:customer_ref] || options[:customer]
|
126
|
+
post[:Title] = options[:billing_address][:title]
|
127
|
+
post[:Company] = options[:billing_address][:company]
|
128
|
+
post[:JobDesc] = options[:billing_address][:job_desc]
|
129
|
+
post[:Email] = options[:billing_address][:email] || options[:email]
|
130
|
+
post[:URL] = options[:billing_address][:url]
|
131
|
+
post[:Comments] = options[:description]
|
132
132
|
end
|
133
133
|
|
134
134
|
def add_invoice(post, options)
|
@@ -136,12 +136,11 @@ module ActiveMerchant #:nodoc:
|
|
136
136
|
post[:invoiceDescription] = options[:description]
|
137
137
|
end
|
138
138
|
|
139
|
-
|
140
139
|
# add credit card details to be stored by eway. NOTE eway requires "title" field
|
141
140
|
def add_creditcard(post, creditcard)
|
142
|
-
post[:CCNumber]
|
143
|
-
post[:CCExpiryMonth]
|
144
|
-
post[:CCExpiryYear] = sprintf(
|
141
|
+
post[:CCNumber] = creditcard.number
|
142
|
+
post[:CCExpiryMonth] = sprintf('%.2i', creditcard.month)
|
143
|
+
post[:CCExpiryYear] = sprintf('%.4i', creditcard.year)[-2..-1]
|
145
144
|
post[:CCNameOnCard] = creditcard.name
|
146
145
|
post[:FirstName] = creditcard.first_name
|
147
146
|
post[:LastName] = creditcard.last_name
|
@@ -150,35 +149,35 @@ module ActiveMerchant #:nodoc:
|
|
150
149
|
def parse(body)
|
151
150
|
reply = {}
|
152
151
|
xml = REXML::Document.new(body)
|
153
|
-
if root = REXML::XPath.first(xml,
|
154
|
-
|
152
|
+
if root = REXML::XPath.first(xml, '//soap:Fault') then
|
153
|
+
reply = parse_fault(root)
|
155
154
|
else
|
156
155
|
if root = REXML::XPath.first(xml, '//ProcessPaymentResponse/ewayResponse') then
|
157
156
|
# Successful payment
|
158
|
-
reply=parse_purchase(root)
|
157
|
+
reply = parse_purchase(root)
|
159
158
|
else
|
160
159
|
if root = REXML::XPath.first(xml, '//QueryCustomerResult') then
|
161
|
-
reply=parse_query_customer(root)
|
160
|
+
reply = parse_query_customer(root)
|
162
161
|
else
|
163
162
|
if root = REXML::XPath.first(xml, '//CreateCustomerResult') then
|
164
|
-
reply[:message]='OK'
|
165
|
-
reply[:CreateCustomerResult]=root.text
|
166
|
-
reply[:success]=true
|
163
|
+
reply[:message] = 'OK'
|
164
|
+
reply[:CreateCustomerResult] = root.text
|
165
|
+
reply[:success] = true
|
167
166
|
else
|
168
167
|
if root = REXML::XPath.first(xml, '//UpdateCustomerResult') then
|
169
|
-
if root.text.
|
170
|
-
reply[:message]='OK'
|
171
|
-
reply[:success]=true
|
168
|
+
if root.text.casecmp('true').zero? then
|
169
|
+
reply[:message] = 'OK'
|
170
|
+
reply[:success] = true
|
172
171
|
else
|
173
172
|
# ERROR: This state should never occur. If there is a problem,
|
174
173
|
# a soap:Fault will be returned. The presence of this
|
175
174
|
# element always means a success.
|
176
|
-
raise StandardError,
|
175
|
+
raise StandardError, 'Unexpected "false" in UpdateCustomerResult'
|
177
176
|
end
|
178
177
|
else
|
179
178
|
# ERROR: This state should never occur currently. We have handled
|
180
179
|
# responses for all the methods which we support.
|
181
|
-
raise StandardError,
|
180
|
+
raise StandardError, 'Unexpected response'
|
182
181
|
end
|
183
182
|
end
|
184
183
|
end
|
@@ -188,93 +187,93 @@ module ActiveMerchant #:nodoc:
|
|
188
187
|
end
|
189
188
|
|
190
189
|
def parse_fault(node)
|
191
|
-
reply={}
|
192
|
-
reply[:message]=REXML::XPath.first(node, '//soap:Reason/soap:Text').text
|
193
|
-
reply[:success]=false
|
190
|
+
reply = {}
|
191
|
+
reply[:message] = REXML::XPath.first(node, '//soap:Reason/soap:Text').text
|
192
|
+
reply[:success] = false
|
194
193
|
reply
|
195
194
|
end
|
196
195
|
|
197
196
|
def parse_purchase(node)
|
198
|
-
reply={}
|
199
|
-
reply[:message]=REXML::XPath.first(node, '//ewayTrxnError').text
|
200
|
-
reply[:success]=(REXML::XPath.first(node, '//ewayTrxnStatus').text == 'True')
|
201
|
-
reply[:auth_code]=REXML::XPath.first(node, '//ewayAuthCode').text
|
202
|
-
reply[:transaction_number]=REXML::XPath.first(node, '//ewayTrxnNumber').text
|
197
|
+
reply = {}
|
198
|
+
reply[:message] = REXML::XPath.first(node, '//ewayTrxnError').text
|
199
|
+
reply[:success] = (REXML::XPath.first(node, '//ewayTrxnStatus').text == 'True')
|
200
|
+
reply[:auth_code] = REXML::XPath.first(node, '//ewayAuthCode').text
|
201
|
+
reply[:transaction_number] = REXML::XPath.first(node, '//ewayTrxnNumber').text
|
203
202
|
reply
|
204
203
|
end
|
205
204
|
|
206
205
|
def parse_query_customer(node)
|
207
|
-
reply={}
|
208
|
-
reply[:message]='OK'
|
209
|
-
reply[:success]=true
|
210
|
-
reply[:CCNumber]=REXML::XPath.first(node, '//CCNumber').text
|
211
|
-
reply[:CCName]=REXML::XPath.first(node, '//CCName').text
|
212
|
-
reply[:CCExpiryMonth]=REXML::XPath.first(node, '//CCExpiryMonth').text
|
213
|
-
reply[:CCExpiryYear]=REXML::XPath.first(node, '//CCExpiryYear').text
|
206
|
+
reply = {}
|
207
|
+
reply[:message] = 'OK'
|
208
|
+
reply[:success] = true
|
209
|
+
reply[:CCNumber] = REXML::XPath.first(node, '//CCNumber').text
|
210
|
+
reply[:CCName] = REXML::XPath.first(node, '//CCName').text
|
211
|
+
reply[:CCExpiryMonth] = REXML::XPath.first(node, '//CCExpiryMonth').text
|
212
|
+
reply[:CCExpiryYear] = REXML::XPath.first(node, '//CCExpiryYear').text
|
214
213
|
reply
|
215
214
|
end
|
216
215
|
|
217
216
|
def commit(action, post)
|
218
|
-
raw =
|
219
|
-
|
220
|
-
|
221
|
-
e
|
222
|
-
|
217
|
+
raw =
|
218
|
+
begin
|
219
|
+
ssl_post(test? ? self.test_url : self.live_url, soap_request(post, action), 'Content-Type' => 'application/soap+xml; charset=utf-8')
|
220
|
+
rescue ResponseError => e
|
221
|
+
e.response.body
|
222
|
+
end
|
223
223
|
response = parse(raw)
|
224
224
|
|
225
225
|
EwayResponse.new(response[:success], response[:message], response,
|
226
|
-
:
|
227
|
-
:
|
228
|
-
)
|
226
|
+
test: test?,
|
227
|
+
authorization: response[:auth_code])
|
229
228
|
end
|
230
229
|
|
231
230
|
# Where we build the full SOAP 1.2 request using builder
|
232
231
|
def soap_request(arguments, action)
|
233
232
|
# eWay demands all fields be sent, but contain an empty string if blank
|
234
233
|
post = case action
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
234
|
+
when 'QueryCustomer'
|
235
|
+
arguments
|
236
|
+
when 'ProcessPayment'
|
237
|
+
default_payment_fields.merge(arguments)
|
238
|
+
when 'CreateCustomer'
|
239
|
+
default_customer_fields.merge(arguments)
|
240
|
+
when 'UpdateCustomer'
|
241
|
+
default_customer_fields.merge(arguments)
|
243
242
|
end
|
244
243
|
|
245
|
-
xml = Builder::XmlMarkup.new :
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
end
|
244
|
+
xml = Builder::XmlMarkup.new indent: 2
|
245
|
+
xml.instruct!
|
246
|
+
xml.tag! 'soap12:Envelope', { 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema', 'xmlns:soap12' => 'http://www.w3.org/2003/05/soap-envelope' } do
|
247
|
+
xml.tag! 'soap12:Header' do
|
248
|
+
xml.tag! 'eWAYHeader', { 'xmlns' => 'https://www.eway.com.au/gateway/managedpayment' } do
|
249
|
+
xml.tag! 'eWAYCustomerID', @options[:login]
|
250
|
+
xml.tag! 'Username', @options[:username]
|
251
|
+
xml.tag! 'Password', @options[:password]
|
254
252
|
end
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
253
|
+
end
|
254
|
+
xml.tag! 'soap12:Body' do |x|
|
255
|
+
x.tag! action, { 'xmlns' => 'https://www.eway.com.au/gateway/managedpayment' } do |y|
|
256
|
+
post.each do |key, value|
|
257
|
+
y.tag! key, value
|
260
258
|
end
|
261
259
|
end
|
262
260
|
end
|
261
|
+
end
|
263
262
|
xml.target!
|
264
263
|
end
|
265
264
|
|
266
265
|
def default_customer_fields
|
267
|
-
hash={}
|
268
|
-
%w(
|
269
|
-
hash[field.to_sym]=''
|
266
|
+
hash = {}
|
267
|
+
%w(CustomerRef Title FirstName LastName Company JobDesc Email Address Suburb State PostCode Country Phone Mobile Fax URL Comments CCNumber CCNameOnCard CCExpiryMonth CCExpiryYear).each do |field|
|
268
|
+
hash[field.to_sym] = ''
|
270
269
|
end
|
271
270
|
return hash
|
272
271
|
end
|
273
272
|
|
274
273
|
def default_payment_fields
|
275
|
-
hash={}
|
276
|
-
%w(
|
277
|
-
hash[field.to_sym]=''
|
274
|
+
hash = {}
|
275
|
+
%w(managedCustomerID amount invoiceReference invoiceDescription).each do |field|
|
276
|
+
hash[field.to_sym] = ''
|
278
277
|
end
|
279
278
|
return hash
|
280
279
|
end
|
@@ -285,7 +284,6 @@ module ActiveMerchant #:nodoc:
|
|
285
284
|
@params['CreateCustomerResult']
|
286
285
|
end
|
287
286
|
end
|
288
|
-
|
289
287
|
end
|
290
288
|
end
|
291
289
|
end
|