activemerchant 1.100.0 → 1.133.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +1057 -0
- data/README.md +11 -9
- data/lib/active_merchant/billing/avs_result.rb +9 -9
- data/lib/active_merchant/billing/base.rb +0 -13
- data/lib/active_merchant/billing/check.rb +49 -17
- data/lib/active_merchant/billing/compatibility.rb +5 -4
- data/lib/active_merchant/billing/credit_card.rb +55 -8
- data/lib/active_merchant/billing/credit_card_formatting.rb +1 -0
- data/lib/active_merchant/billing/credit_card_methods.rb +209 -36
- data/lib/active_merchant/billing/cvv_result.rb +0 -1
- data/lib/active_merchant/billing/gateway.rb +38 -36
- data/lib/active_merchant/billing/gateways/adyen.rb +399 -78
- 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 +14 -14
- data/lib/active_merchant/billing/gateways/authorize_net.rb +200 -130
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +27 -20
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +48 -51
- data/lib/active_merchant/billing/gateways/axcessms.rb +13 -15
- data/lib/active_merchant/billing/gateways/balanced.rb +43 -36
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +16 -20
- data/lib/active_merchant/billing/gateways/bank_frick.rb +13 -13
- data/lib/active_merchant/billing/gateways/banwire.rb +5 -5
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +43 -30
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +1 -1
- data/lib/active_merchant/billing/gateways/be2bill.rb +5 -5
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +37 -36
- data/lib/active_merchant/billing/gateways/beanstream.rb +21 -3
- data/lib/active_merchant/billing/gateways/beanstream_interac.rb +1 -1
- data/lib/active_merchant/billing/gateways/blue_pay.rb +53 -28
- data/lib/active_merchant/billing/gateways/blue_snap.rb +176 -54
- data/lib/active_merchant/billing/gateways/bogus.rb +24 -20
- data/lib/active_merchant/billing/gateways/borgun.rb +92 -38
- data/lib/active_merchant/billing/gateways/bpoint.rb +15 -15
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +8 -2
- 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 +387 -175
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +13 -13
- data/lib/active_merchant/billing/gateways/cams.rb +10 -10
- data/lib/active_merchant/billing/gateways/card_connect.rb +33 -14
- data/lib/active_merchant/billing/gateways/card_save.rb +3 -4
- data/lib/active_merchant/billing/gateways/card_stream.rb +67 -40
- data/lib/active_merchant/billing/gateways/cardknox.rb +13 -13
- data/lib/active_merchant/billing/gateways/cardprocess.rb +4 -2
- data/lib/active_merchant/billing/gateways/cashnet.rb +28 -12
- data/lib/active_merchant/billing/gateways/cc5.rb +9 -9
- data/lib/active_merchant/billing/gateways/cecabank.rb +38 -38
- data/lib/active_merchant/billing/gateways/cenpos.rb +29 -28
- data/lib/active_merchant/billing/gateways/checkout.rb +7 -9
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +316 -68
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -2
- data/lib/active_merchant/billing/gateways/clearhaus.rb +32 -33
- data/lib/active_merchant/billing/gateways/commerce_hub.rb +370 -0
- data/lib/active_merchant/billing/gateways/commercegate.rb +4 -4
- data/lib/active_merchant/billing/gateways/conekta.rb +8 -6
- data/lib/active_merchant/billing/gateways/creditcall.rb +18 -17
- data/lib/active_merchant/billing/gateways/credorax.rb +152 -63
- data/lib/active_merchant/billing/gateways/ct_payment.rb +15 -14
- data/lib/active_merchant/billing/gateways/culqi.rb +30 -28
- data/lib/active_merchant/billing/gateways/cyber_source/cyber_source_common.rb +36 -0
- data/lib/active_merchant/billing/gateways/cyber_source.rb +496 -187
- data/lib/active_merchant/billing/gateways/cyber_source_rest.rb +454 -0
- data/lib/active_merchant/billing/gateways/d_local.rb +148 -31
- data/lib/active_merchant/billing/gateways/data_cash.rb +34 -37
- data/lib/active_merchant/billing/gateways/decidir.rb +134 -21
- data/lib/active_merchant/billing/gateways/decidir_plus.rb +344 -0
- data/lib/active_merchant/billing/gateways/dibs.rb +10 -10
- data/lib/active_merchant/billing/gateways/digitzs.rb +11 -8
- data/lib/active_merchant/billing/gateways/ebanx.rb +90 -40
- data/lib/active_merchant/billing/gateways/efsnet.rb +36 -36
- data/lib/active_merchant/billing/gateways/elavon.rb +349 -194
- data/lib/active_merchant/billing/gateways/element.rb +71 -21
- data/lib/active_merchant/billing/gateways/epay.rb +43 -43
- data/lib/active_merchant/billing/gateways/evo_ca.rb +12 -13
- data/lib/active_merchant/billing/gateways/eway.rb +9 -9
- data/lib/active_merchant/billing/gateways/eway_managed.rb +55 -56
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +37 -22
- data/lib/active_merchant/billing/gateways/exact.rb +19 -20
- data/lib/active_merchant/billing/gateways/ezic.rb +9 -9
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +24 -19
- data/lib/active_merchant/billing/gateways/federated_canada.rb +6 -7
- data/lib/active_merchant/billing/gateways/finansbank.rb +3 -3
- data/lib/active_merchant/billing/gateways/first_giving.rb +5 -4
- data/lib/active_merchant/billing/gateways/first_pay.rb +7 -7
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +39 -38
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +51 -31
- data/lib/active_merchant/billing/gateways/flo2cash.rb +24 -24
- data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +1 -1
- data/lib/active_merchant/billing/gateways/forte.rb +38 -22
- data/lib/active_merchant/billing/gateways/garanti.rb +12 -15
- data/lib/active_merchant/billing/gateways/global_collect.rb +333 -89
- data/lib/active_merchant/billing/gateways/global_transport.rb +8 -9
- data/lib/active_merchant/billing/gateways/hdfc.rb +22 -23
- data/lib/active_merchant/billing/gateways/hps.rb +171 -50
- data/lib/active_merchant/billing/gateways/iats_payments.rb +47 -25
- data/lib/active_merchant/billing/gateways/in_context_paypal_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/inspire.rb +22 -27
- data/lib/active_merchant/billing/gateways/instapay.rb +5 -8
- data/lib/active_merchant/billing/gateways/ipg.rb +420 -0
- data/lib/active_merchant/billing/gateways/ipp.rb +9 -9
- data/lib/active_merchant/billing/gateways/iridium.rb +30 -31
- data/lib/active_merchant/billing/gateways/itransact.rb +11 -10
- data/lib/active_merchant/billing/gateways/iveri.rb +62 -23
- data/lib/active_merchant/billing/gateways/ixopay.rb +320 -0
- data/lib/active_merchant/billing/gateways/jetpay.rb +10 -17
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +13 -18
- data/lib/active_merchant/billing/gateways/komoju.rb +1 -1
- data/lib/active_merchant/billing/gateways/kushki.rb +100 -22
- data/lib/active_merchant/billing/gateways/latitude19.rb +20 -19
- data/lib/active_merchant/billing/gateways/linkpoint.rb +71 -72
- data/lib/active_merchant/billing/gateways/litle.rb +181 -45
- data/lib/active_merchant/billing/gateways/mastercard.rb +16 -22
- data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +89 -18
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +58 -24
- data/lib/active_merchant/billing/gateways/merchant_one.rb +7 -10
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +19 -19
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +18 -22
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +15 -17
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +46 -8
- data/lib/active_merchant/billing/gateways/mercury.rb +19 -23
- data/lib/active_merchant/billing/gateways/metrics_global.rb +24 -33
- data/lib/active_merchant/billing/gateways/micropayment.rb +11 -12
- data/lib/active_merchant/billing/gateways/migs/migs_codes.rb +7 -7
- data/lib/active_merchant/billing/gateways/migs.rb +18 -21
- data/lib/active_merchant/billing/gateways/mit.rb +260 -0
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +10 -12
- data/lib/active_merchant/billing/gateways/moka.rb +290 -0
- data/lib/active_merchant/billing/gateways/monei.rb +236 -150
- data/lib/active_merchant/billing/gateways/moneris.rb +122 -53
- data/lib/active_merchant/billing/gateways/money_movers.rb +6 -7
- data/lib/active_merchant/billing/gateways/mundipagg.rb +69 -23
- data/lib/active_merchant/billing/gateways/nab_transact.rb +18 -20
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +10 -12
- data/lib/active_merchant/billing/gateways/net_registry.rb +8 -9
- data/lib/active_merchant/billing/gateways/netaxept.rb +12 -12
- data/lib/active_merchant/billing/gateways/netbanx.rb +128 -46
- data/lib/active_merchant/billing/gateways/netbilling.rb +18 -21
- data/lib/active_merchant/billing/gateways/netpay.rb +5 -4
- data/lib/active_merchant/billing/gateways/network_merchants.rb +7 -10
- data/lib/active_merchant/billing/gateways/nmi.rb +69 -27
- data/lib/active_merchant/billing/gateways/ogone.rb +62 -31
- data/lib/active_merchant/billing/gateways/omise.rb +15 -16
- data/lib/active_merchant/billing/gateways/openpay.rb +33 -15
- data/lib/active_merchant/billing/gateways/opp.rb +39 -33
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +43 -42
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +3 -5
- data/lib/active_merchant/billing/gateways/orbital.rb +623 -362
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +20 -20
- data/lib/active_merchant/billing/gateways/pagarme.rb +16 -23
- data/lib/active_merchant/billing/gateways/pago_facil.rb +4 -6
- data/lib/active_merchant/billing/gateways/pay_arc.rb +392 -0
- data/lib/active_merchant/billing/gateways/pay_conex.rb +17 -17
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +30 -33
- data/lib/active_merchant/billing/gateways/pay_hub.rb +10 -10
- data/lib/active_merchant/billing/gateways/pay_junction.rb +31 -31
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +36 -18
- data/lib/active_merchant/billing/gateways/pay_secure.rb +10 -11
- data/lib/active_merchant/billing/gateways/pay_trace.rb +450 -0
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +64 -40
- data/lib/active_merchant/billing/gateways/payeezy.rb +130 -27
- data/lib/active_merchant/billing/gateways/payex.rb +24 -25
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +17 -17
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +1 -1
- data/lib/active_merchant/billing/gateways/payflow.rb +103 -25
- data/lib/active_merchant/billing/gateways/payflow_express.rb +4 -4
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +1 -1
- data/lib/active_merchant/billing/gateways/payment_express.rb +22 -18
- data/lib/active_merchant/billing/gateways/paymentez.rb +89 -24
- data/lib/active_merchant/billing/gateways/paymill.rb +14 -16
- 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 +13 -5
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal_express.rb +4 -1
- 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 +8 -9
- data/lib/active_merchant/billing/gateways/paystation.rb +6 -9
- data/lib/active_merchant/billing/gateways/payu_in.rb +20 -19
- data/lib/active_merchant/billing/gateways/payu_latam.rb +70 -37
- data/lib/active_merchant/billing/gateways/payway.rb +22 -22
- data/lib/active_merchant/billing/gateways/payway_dot_com.rb +253 -0
- data/lib/active_merchant/billing/gateways/pin.rb +60 -21
- data/lib/active_merchant/billing/gateways/plexo.rb +308 -0
- data/lib/active_merchant/billing/gateways/plugnpay.rb +20 -21
- data/lib/active_merchant/billing/gateways/priority.rb +392 -0
- data/lib/active_merchant/billing/gateways/pro_pay.rb +13 -14
- data/lib/active_merchant/billing/gateways/psigate.rb +29 -29
- data/lib/active_merchant/billing/gateways/psl_card.rb +7 -8
- data/lib/active_merchant/billing/gateways/qbms.rb +25 -26
- data/lib/active_merchant/billing/gateways/quantum.rb +9 -11
- data/lib/active_merchant/billing/gateways/quickbooks.rb +126 -39
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +98 -98
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +19 -23
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +3 -3
- data/lib/active_merchant/billing/gateways/quickpay.rb +0 -1
- data/lib/active_merchant/billing/gateways/qvalent.rb +36 -20
- 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 +42 -16
- data/lib/active_merchant/billing/gateways/redsys.rb +191 -86
- data/lib/active_merchant/billing/gateways/s5.rb +10 -9
- data/lib/active_merchant/billing/gateways/safe_charge.rb +70 -33
- data/lib/active_merchant/billing/gateways/sage.rb +19 -21
- data/lib/active_merchant/billing/gateways/sage_pay.rb +57 -57
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +3 -4
- data/lib/active_merchant/billing/gateways/secure_net.rb +19 -26
- data/lib/active_merchant/billing/gateways/secure_pay.rb +24 -33
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +18 -20
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +4 -5
- data/lib/active_merchant/billing/gateways/securion_pay.rb +48 -7
- data/lib/active_merchant/billing/gateways/shift4.rb +345 -0
- data/lib/active_merchant/billing/gateways/simetrik.rb +368 -0
- data/lib/active_merchant/billing/gateways/skip_jack.rb +19 -19
- data/lib/active_merchant/billing/gateways/smart_ps.rb +26 -32
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +24 -25
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +27 -21
- data/lib/active_merchant/billing/gateways/stripe.rb +126 -53
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +441 -113
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +7 -8
- data/lib/active_merchant/billing/gateways/telr.rb +17 -18
- data/lib/active_merchant/billing/gateways/tns.rb +3 -7
- data/lib/active_merchant/billing/gateways/trans_first.rb +10 -9
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +28 -24
- data/lib/active_merchant/billing/gateways/transact_pro.rb +13 -15
- data/lib/active_merchant/billing/gateways/transax.rb +1 -2
- data/lib/active_merchant/billing/gateways/trexle.rb +5 -2
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +57 -47
- data/lib/active_merchant/billing/gateways/usa_epay.rb +1 -2
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +176 -184
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +60 -48
- data/lib/active_merchant/billing/gateways/vanco.rb +17 -8
- data/lib/active_merchant/billing/gateways/verifi.rb +13 -14
- data/lib/active_merchant/billing/gateways/viaklix.rb +9 -14
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +26 -21
- data/lib/active_merchant/billing/gateways/vpos.rb +223 -0
- data/lib/active_merchant/billing/gateways/webpay.rb +4 -4
- data/lib/active_merchant/billing/gateways/wepay.rb +14 -16
- data/lib/active_merchant/billing/gateways/wirecard.rb +14 -16
- data/lib/active_merchant/billing/gateways/wompi.rb +197 -0
- data/lib/active_merchant/billing/gateways/world_net.rb +36 -35
- data/lib/active_merchant/billing/gateways/worldpay.rb +556 -190
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +47 -54
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +16 -16
- data/lib/active_merchant/billing/network_tokenization_credit_card.rb +2 -2
- data/lib/active_merchant/billing/response.rb +25 -6
- 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 +14 -15
- data/lib/active_merchant/country.rb +3 -1
- data/lib/active_merchant/errors.rb +4 -1
- data/lib/active_merchant/net_http_ssl_connection.rb +1 -0
- data/lib/active_merchant/network_connection_retries.rb +15 -17
- data/lib/active_merchant/post_data.rb +3 -2
- data/lib/active_merchant/posts_data.rb +2 -2
- data/lib/active_merchant/version.rb +1 -1
- data/lib/active_merchant.rb +2 -2
- data/lib/certs/cacert.pem +1587 -2361
- data/lib/support/gateway_support.rb +1 -1
- data/lib/support/ssl_verify.rb +3 -7
- data/lib/support/ssl_version.rb +2 -3
- metadata +86 -34
- data/lib/active_merchant/billing/gateways/moneris_us.rb +0 -352
@@ -7,8 +7,8 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.test_url = 'https://train.cashnet.com/'
|
8
8
|
|
9
9
|
self.supported_countries = ['US']
|
10
|
-
self.supported_cardtypes = [
|
11
|
-
self.homepage_url = '
|
10
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
11
|
+
self.homepage_url = 'https://transactcampus.com'
|
12
12
|
self.display_name = 'Cashnet'
|
13
13
|
self.money_format = :dollars
|
14
14
|
self.max_retries = 0
|
@@ -41,7 +41,7 @@ module ActiveMerchant #:nodoc:
|
|
41
41
|
def purchase(money, payment_object, options = {})
|
42
42
|
post = {}
|
43
43
|
add_creditcard(post, payment_object)
|
44
|
-
add_invoice(post, options)
|
44
|
+
add_invoice(post, money, options)
|
45
45
|
add_address(post, options)
|
46
46
|
add_customer_data(post, options)
|
47
47
|
commit('SALE', money, post)
|
@@ -49,8 +49,8 @@ module ActiveMerchant #:nodoc:
|
|
49
49
|
|
50
50
|
def refund(money, identification, options = {})
|
51
51
|
post = {}
|
52
|
-
post[:origtx]
|
53
|
-
add_invoice(post, options)
|
52
|
+
post[:origtx] = identification
|
53
|
+
add_invoice(post, money, options)
|
54
54
|
add_customer_data(post, options)
|
55
55
|
commit('REFUND', money, post)
|
56
56
|
end
|
@@ -69,14 +69,13 @@ module ActiveMerchant #:nodoc:
|
|
69
69
|
private
|
70
70
|
|
71
71
|
def commit(action, money, fields)
|
72
|
-
fields[:amount] = amount(money)
|
73
72
|
url = (test? ? test_url : live_url) + CGI.escape(@options[:merchant_gateway_name])
|
74
73
|
raw_response = ssl_post(url, post_data(action, fields))
|
75
74
|
parsed_response = parse(raw_response)
|
76
75
|
|
77
76
|
return unparsable_response(raw_response) unless parsed_response
|
78
77
|
|
79
|
-
success = (parsed_response
|
78
|
+
success = success?(parsed_response)
|
80
79
|
Response.new(
|
81
80
|
success,
|
82
81
|
CASHNET_CODES[parsed_response[:result]],
|
@@ -86,8 +85,13 @@ module ActiveMerchant #:nodoc:
|
|
86
85
|
)
|
87
86
|
end
|
88
87
|
|
88
|
+
def success?(response)
|
89
|
+
response[:result] == '0'
|
90
|
+
end
|
91
|
+
|
89
92
|
def post_data(action, parameters = {})
|
90
93
|
post = {}
|
94
|
+
|
91
95
|
post[:command] = action
|
92
96
|
post[:merchant] = @options[:merchant]
|
93
97
|
post[:operator] = @options[:operator]
|
@@ -106,9 +110,19 @@ module ActiveMerchant #:nodoc:
|
|
106
110
|
post[:lname] = creditcard.last_name
|
107
111
|
end
|
108
112
|
|
109
|
-
def add_invoice(post, options)
|
110
|
-
post[:order_number]
|
111
|
-
|
113
|
+
def add_invoice(post, money, options)
|
114
|
+
post[:order_number] = options[:order_id] if options[:order_id].present?
|
115
|
+
|
116
|
+
if options[:item_codes].present?
|
117
|
+
codes_and_amounts = options[:item_codes].transform_keys { |key| key.to_s.delete('_') }
|
118
|
+
codes_and_amounts.each do |key, value|
|
119
|
+
post[key] = value if key.start_with?('itemcode')
|
120
|
+
post[key] = amount(value.to_i) if key.start_with?('amount')
|
121
|
+
end
|
122
|
+
else
|
123
|
+
post[:itemcode] = (options[:item_code] || @options[:default_item_code])
|
124
|
+
post[:amount] = amount(money.to_i)
|
125
|
+
end
|
112
126
|
end
|
113
127
|
|
114
128
|
def add_address(post, options)
|
@@ -121,8 +135,8 @@ module ActiveMerchant #:nodoc:
|
|
121
135
|
end
|
122
136
|
|
123
137
|
def add_customer_data(post, options)
|
124
|
-
post[:email_g]
|
125
|
-
post[:custcode]
|
138
|
+
post[:email_g] = options[:email]
|
139
|
+
post[:custcode] = options[:custcode] unless empty?(options[:custcode])
|
126
140
|
end
|
127
141
|
|
128
142
|
def expdate(creditcard)
|
@@ -145,6 +159,7 @@ module ActiveMerchant #:nodoc:
|
|
145
159
|
elsif response.code.to_i == 302
|
146
160
|
return ssl_get(URI.parse(response['location']))
|
147
161
|
end
|
162
|
+
|
148
163
|
raise ResponseError.new(response)
|
149
164
|
end
|
150
165
|
|
@@ -190,6 +205,7 @@ module ActiveMerchant #:nodoc:
|
|
190
205
|
'215' => 'Old PIN does not validate ',
|
191
206
|
'221' => 'Invalid credit card processor type specified in location or payment code',
|
192
207
|
'222' => 'Credit card processor error',
|
208
|
+
'230' => 'Host Error (USE VOID OR REVERSAL TO REFUND UNSETTLED TRANSACTIONS)',
|
193
209
|
'280' => 'SmartPay transaction not posted',
|
194
210
|
'301' => 'Original transaction not found for this customer',
|
195
211
|
'302' => 'Amount to refund exceeds original payment amount or is missing',
|
@@ -48,9 +48,9 @@ module ActiveMerchant #:nodoc:
|
|
48
48
|
protected
|
49
49
|
|
50
50
|
def build_sale_request(type, money, creditcard, options = {})
|
51
|
-
requires!(options,
|
51
|
+
requires!(options, :order_id)
|
52
52
|
|
53
|
-
xml = Builder::XmlMarkup.new :
|
53
|
+
xml = Builder::XmlMarkup.new indent: 2
|
54
54
|
|
55
55
|
xml.tag! 'CC5Request' do
|
56
56
|
add_login_tags(xml)
|
@@ -62,7 +62,7 @@ module ActiveMerchant #:nodoc:
|
|
62
62
|
add_amount_tags(money, options, xml)
|
63
63
|
xml.tag! 'Email', options[:email] if options[:email]
|
64
64
|
|
65
|
-
if(address = (options[:billing_address] || options[:address]))
|
65
|
+
if (address = (options[:billing_address] || options[:address]))
|
66
66
|
xml.tag! 'BillTo' do
|
67
67
|
add_address(xml, address)
|
68
68
|
end
|
@@ -76,7 +76,7 @@ module ActiveMerchant #:nodoc:
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def build_capture_request(money, authorization, options = {})
|
79
|
-
xml = Builder::XmlMarkup.new :
|
79
|
+
xml = Builder::XmlMarkup.new indent: 2
|
80
80
|
|
81
81
|
xml.tag! 'CC5Request' do
|
82
82
|
add_login_tags(xml)
|
@@ -87,7 +87,7 @@ module ActiveMerchant #:nodoc:
|
|
87
87
|
end
|
88
88
|
|
89
89
|
def build_void_request(authorization, options = {})
|
90
|
-
xml = Builder::XmlMarkup.new :
|
90
|
+
xml = Builder::XmlMarkup.new indent: 2
|
91
91
|
|
92
92
|
xml.tag! 'CC5Request' do
|
93
93
|
add_login_tags(xml)
|
@@ -97,7 +97,7 @@ module ActiveMerchant #:nodoc:
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def build_authorization_credit_request(money, authorization, options = {})
|
100
|
-
xml = Builder::XmlMarkup.new :
|
100
|
+
xml = Builder::XmlMarkup.new indent: 2
|
101
101
|
|
102
102
|
xml.tag! 'CC5Request' do
|
103
103
|
add_login_tags(xml)
|
@@ -108,7 +108,7 @@ module ActiveMerchant #:nodoc:
|
|
108
108
|
end
|
109
109
|
|
110
110
|
def build_creditcard_credit_request(money, creditcard, options = {})
|
111
|
-
xml = Builder::XmlMarkup.new :
|
111
|
+
xml = Builder::XmlMarkup.new indent: 2
|
112
112
|
|
113
113
|
xml.tag! 'CC5Request' do
|
114
114
|
add_login_tags(xml)
|
@@ -157,8 +157,8 @@ module ActiveMerchant #:nodoc:
|
|
157
157
|
success,
|
158
158
|
(success ? 'Approved' : "Declined (Reason: #{response[:proc_return_code]} - #{response[:err_msg]})"),
|
159
159
|
response,
|
160
|
-
:
|
161
|
-
:
|
160
|
+
test: test?,
|
161
|
+
authorization: response[:order_id]
|
162
162
|
)
|
163
163
|
end
|
164
164
|
|
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
self.live_url = 'https://pgw.ceca.es'
|
6
6
|
|
7
7
|
self.supported_countries = ['ES']
|
8
|
-
self.supported_cardtypes = [
|
8
|
+
self.supported_cardtypes = %i[visa master american_express]
|
9
9
|
self.homepage_url = 'http://www.ceca.es/es/'
|
10
10
|
self.display_name = 'Cecabank'
|
11
11
|
self.default_currency = 'EUR'
|
@@ -21,7 +21,7 @@ module ActiveMerchant #:nodoc:
|
|
21
21
|
CECA_UI_LESS_REFUND_PAGE = 'anulacion_xml'
|
22
22
|
CECA_ACTION_REFUND = 'anulaciones/anularParcial' # use partial refund's URL to avoid time frame limitations and decision logic on client side
|
23
23
|
CECA_ACTION_PURCHASE = 'tpv/compra'
|
24
|
-
CECA_CURRENCIES_DICTIONARY = {'EUR' => 978, 'USD' => 840, 'GBP' => 826}
|
24
|
+
CECA_CURRENCIES_DICTIONARY = { 'EUR' => 978, 'USD' => 840, 'GBP' => 826 }
|
25
25
|
|
26
26
|
# Creates a new CecabankGateway
|
27
27
|
#
|
@@ -57,14 +57,14 @@ module ActiveMerchant #:nodoc:
|
|
57
57
|
def purchase(money, creditcard, options = {})
|
58
58
|
requires!(options, :order_id)
|
59
59
|
|
60
|
-
post = {'Descripcion' => options[:description],
|
60
|
+
post = { 'Descripcion' => options[:description],
|
61
61
|
'Num_operacion' => options[:order_id],
|
62
62
|
'Idioma' => CECA_UI_LESS_LANGUAGE,
|
63
63
|
'Pago_soportado' => CECA_MODE,
|
64
64
|
'URL_OK' => CECA_NOTIFICATIONS_URL,
|
65
65
|
'URL_NOK' => CECA_NOTIFICATIONS_URL,
|
66
66
|
'Importe' => amount(money),
|
67
|
-
'TipoMoneda' => CECA_CURRENCIES_DICTIONARY[options[:currency] || currency(money)]}
|
67
|
+
'TipoMoneda' => CECA_CURRENCIES_DICTIONARY[options[:currency] || currency(money)] }
|
68
68
|
|
69
69
|
add_creditcard(post, creditcard)
|
70
70
|
|
@@ -84,12 +84,12 @@ module ActiveMerchant #:nodoc:
|
|
84
84
|
def refund(money, identification, options = {})
|
85
85
|
reference, order_id = split_authorization(identification)
|
86
86
|
|
87
|
-
post = {'Referencia' => reference,
|
87
|
+
post = { 'Referencia' => reference,
|
88
88
|
'Num_operacion' => order_id,
|
89
89
|
'Idioma' => CECA_UI_LESS_LANGUAGE_REFUND,
|
90
90
|
'Pagina' => CECA_UI_LESS_REFUND_PAGE,
|
91
91
|
'Importe' => amount(money),
|
92
|
-
'TipoMoneda' => CECA_CURRENCIES_DICTIONARY[options[:currency] || currency(money)]}
|
92
|
+
'TipoMoneda' => CECA_CURRENCIES_DICTIONARY[options[:currency] || currency(money)] }
|
93
93
|
|
94
94
|
commit(CECA_ACTION_REFUND, post)
|
95
95
|
end
|
@@ -130,7 +130,7 @@ module ActiveMerchant #:nodoc:
|
|
130
130
|
|
131
131
|
if root.elements['OPERACION']
|
132
132
|
response[:operation_type] = root.elements['OPERACION'].attributes['tipo']
|
133
|
-
response[:amount] =
|
133
|
+
response[:amount] = root.elements['OPERACION/importe'].text.strip
|
134
134
|
end
|
135
135
|
|
136
136
|
response[:description] = root.elements['OPERACION/descripcion'].text if root.elements['OPERACION/descripcion']
|
@@ -143,9 +143,7 @@ module ActiveMerchant #:nodoc:
|
|
143
143
|
response[:error_message] = root.elements['ERROR/descripcion'].text
|
144
144
|
else
|
145
145
|
if root.elements['OPERACION'].attributes['numeroOperacion'] == '000'
|
146
|
-
if
|
147
|
-
response[:authorization] = root.elements['OPERACION/numeroAutorizacion'].text
|
148
|
-
end
|
146
|
+
response[:authorization] = root.elements['OPERACION/numeroAutorizacion'].text if root.elements['OPERACION/numeroAutorizacion']
|
149
147
|
else
|
150
148
|
response[:authorization] = root.attributes['numeroOperacion']
|
151
149
|
end
|
@@ -175,9 +173,9 @@ module ActiveMerchant #:nodoc:
|
|
175
173
|
response[:success],
|
176
174
|
message_from(response),
|
177
175
|
response,
|
178
|
-
:
|
179
|
-
:
|
180
|
-
:
|
176
|
+
test: test?,
|
177
|
+
authorization: build_authorization(response),
|
178
|
+
error_code: response[:error_code]
|
181
179
|
)
|
182
180
|
end
|
183
181
|
|
@@ -196,6 +194,7 @@ module ActiveMerchant #:nodoc:
|
|
196
194
|
|
197
195
|
params.map do |key, value|
|
198
196
|
next if value.blank?
|
197
|
+
|
199
198
|
if value.is_a?(Hash)
|
200
199
|
h = {}
|
201
200
|
value.each do |k, v|
|
@@ -217,31 +216,32 @@ module ActiveMerchant #:nodoc:
|
|
217
216
|
end
|
218
217
|
|
219
218
|
def generate_signature(action, parameters)
|
220
|
-
signature_fields =
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
219
|
+
signature_fields =
|
220
|
+
case action
|
221
|
+
when CECA_ACTION_REFUND
|
222
|
+
options[:key].to_s +
|
223
|
+
options[:merchant_id].to_s +
|
224
|
+
options[:acquirer_bin].to_s +
|
225
|
+
options[:terminal_id].to_s +
|
226
|
+
parameters['Num_operacion'].to_s +
|
227
|
+
parameters['Importe'].to_s +
|
228
|
+
parameters['TipoMoneda'].to_s +
|
229
|
+
CECA_DECIMALS +
|
230
|
+
parameters['Referencia'].to_s +
|
231
|
+
CECA_ENCRIPTION
|
232
|
+
else
|
233
|
+
options[:key].to_s +
|
234
|
+
options[:merchant_id].to_s +
|
235
|
+
options[:acquirer_bin].to_s +
|
236
|
+
options[:terminal_id].to_s +
|
237
|
+
parameters['Num_operacion'].to_s +
|
238
|
+
parameters['Importe'].to_s +
|
239
|
+
parameters['TipoMoneda'].to_s +
|
240
|
+
CECA_DECIMALS +
|
241
|
+
CECA_ENCRIPTION +
|
242
|
+
CECA_NOTIFICATIONS_URL +
|
243
|
+
CECA_NOTIFICATIONS_URL
|
244
|
+
end
|
245
245
|
Digest::SHA2.hexdigest(signature_fields)
|
246
246
|
end
|
247
247
|
end
|
@@ -11,14 +11,14 @@ module ActiveMerchant #:nodoc:
|
|
11
11
|
self.supported_countries = %w(AD AI AG AR AU AT BS BB BE BZ BM BR BN BG CA HR CY CZ DK DM EE FI FR DE GR GD GY HK HU IS IL IT JP LV LI LT LU MY MT MX MC MS NL PA PL PT KN LC MF VC SM SG SK SI ZA ES SR SE CH TR GB US UY)
|
12
12
|
self.default_currency = 'USD'
|
13
13
|
self.money_format = :dollars
|
14
|
-
self.supported_cardtypes = [
|
14
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
15
15
|
|
16
|
-
def initialize(options={})
|
16
|
+
def initialize(options = {})
|
17
17
|
requires!(options, :merchant_id, :password, :user_id)
|
18
18
|
super
|
19
19
|
end
|
20
20
|
|
21
|
-
def purchase(amount, payment_method, options={})
|
21
|
+
def purchase(amount, payment_method, options = {})
|
22
22
|
post = {}
|
23
23
|
add_invoice(post, amount, options)
|
24
24
|
add_payment_method(post, payment_method)
|
@@ -27,7 +27,7 @@ module ActiveMerchant #:nodoc:
|
|
27
27
|
commit('Sale', post)
|
28
28
|
end
|
29
29
|
|
30
|
-
def authorize(amount, payment_method, options={})
|
30
|
+
def authorize(amount, payment_method, options = {})
|
31
31
|
post = {}
|
32
32
|
add_invoice(post, amount, options)
|
33
33
|
add_payment_method(post, payment_method)
|
@@ -36,7 +36,7 @@ module ActiveMerchant #:nodoc:
|
|
36
36
|
commit('Auth', post)
|
37
37
|
end
|
38
38
|
|
39
|
-
def capture(amount, authorization, options={})
|
39
|
+
def capture(amount, authorization, options = {})
|
40
40
|
post = {}
|
41
41
|
add_invoice(post, amount, options)
|
42
42
|
add_reference(post, authorization)
|
@@ -45,7 +45,7 @@ module ActiveMerchant #:nodoc:
|
|
45
45
|
commit('SpecialForce', post)
|
46
46
|
end
|
47
47
|
|
48
|
-
def void(authorization, options={})
|
48
|
+
def void(authorization, options = {})
|
49
49
|
post = {}
|
50
50
|
add_void_required_elements(post)
|
51
51
|
add_reference(post, authorization)
|
@@ -56,7 +56,7 @@ module ActiveMerchant #:nodoc:
|
|
56
56
|
commit('Void', post)
|
57
57
|
end
|
58
58
|
|
59
|
-
def refund(amount, authorization, options={})
|
59
|
+
def refund(amount, authorization, options = {})
|
60
60
|
post = {}
|
61
61
|
add_invoice(post, amount, options)
|
62
62
|
add_reference(post, authorization)
|
@@ -65,7 +65,7 @@ module ActiveMerchant #:nodoc:
|
|
65
65
|
commit('SpecialReturn', post)
|
66
66
|
end
|
67
67
|
|
68
|
-
def credit(amount, payment_method, options={})
|
68
|
+
def credit(amount, payment_method, options = {})
|
69
69
|
post = {}
|
70
70
|
add_invoice(post, amount, options)
|
71
71
|
add_payment_method(post, payment_method)
|
@@ -73,7 +73,7 @@ module ActiveMerchant #:nodoc:
|
|
73
73
|
commit('Credit', post)
|
74
74
|
end
|
75
75
|
|
76
|
-
def verify(credit_card, options={})
|
76
|
+
def verify(credit_card, options = {})
|
77
77
|
MultiResponse.run(:use_first_response) do |r|
|
78
78
|
r.process { authorize(100, credit_card, options) }
|
79
79
|
r.process(:ignore_result) { void(r.authorization, options) }
|
@@ -112,7 +112,7 @@ module ActiveMerchant #:nodoc:
|
|
112
112
|
end
|
113
113
|
|
114
114
|
def add_customer_data(post, options)
|
115
|
-
if(billing_address = (options[:billing_address] || options[:address]))
|
115
|
+
if (billing_address = (options[:billing_address] || options[:address]))
|
116
116
|
post[:CustomerEmailAddress] = billing_address[:email]
|
117
117
|
post[:CustomerPhone] = billing_address[:phone]
|
118
118
|
post[:CustomerBillingAddress] = billing_address[:address1]
|
@@ -156,7 +156,7 @@ module ActiveMerchant #:nodoc:
|
|
156
156
|
xml = ssl_post(self.live_url, data, headers)
|
157
157
|
raw = parse(xml)
|
158
158
|
rescue ActiveMerchant::ResponseError => e
|
159
|
-
if
|
159
|
+
if e.response.code == '500' && e.response.body.start_with?('<s:Envelope')
|
160
160
|
raw = {
|
161
161
|
message: 'See transcript for detailed error description.'
|
162
162
|
}
|
@@ -181,13 +181,13 @@ module ActiveMerchant #:nodoc:
|
|
181
181
|
def headers
|
182
182
|
{
|
183
183
|
'Accept-Encoding' => 'identity',
|
184
|
-
'Content-Type'
|
185
|
-
'SOAPAction'
|
184
|
+
'Content-Type' => 'text/xml;charset=UTF-8',
|
185
|
+
'SOAPAction' => 'http://tempuri.org/Transactional/ProcessCreditCard'
|
186
186
|
}
|
187
187
|
end
|
188
188
|
|
189
189
|
def build_request(post)
|
190
|
-
xml = Builder::XmlMarkup.new :
|
190
|
+
xml = Builder::XmlMarkup.new indent: 8
|
191
191
|
xml.tag!('acr:MerchantId', post.delete(:MerchantId))
|
192
192
|
xml.tag!('acr:Password', post.delete(:Password))
|
193
193
|
xml.tag!('acr:UserId', post.delete(:UserId))
|
@@ -198,18 +198,18 @@ module ActiveMerchant #:nodoc:
|
|
198
198
|
end
|
199
199
|
|
200
200
|
def envelope(body)
|
201
|
-
|
202
|
-
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:acr="http://schemas.datacontract.org/2004/07/Acriter.ABI.CenPOS.EPayment.VirtualTerminal.Common" xmlns:acr1="http://schemas.datacontract.org/2004/07/Acriter.ABI.CenPOS.EPayment.VirtualTerminal.v6.Common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
203
|
-
<soapenv:Header/>
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
</soapenv:Envelope>
|
212
|
-
|
201
|
+
<<~XML
|
202
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:acr="http://schemas.datacontract.org/2004/07/Acriter.ABI.CenPOS.EPayment.VirtualTerminal.Common" xmlns:acr1="http://schemas.datacontract.org/2004/07/Acriter.ABI.CenPOS.EPayment.VirtualTerminal.v6.Common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
203
|
+
<soapenv:Header/>
|
204
|
+
<soapenv:Body>
|
205
|
+
<tem:ProcessCreditCard>
|
206
|
+
<tem:request>
|
207
|
+
#{body}
|
208
|
+
</tem:request>
|
209
|
+
</tem:ProcessCreditCard>
|
210
|
+
</soapenv:Body>
|
211
|
+
</soapenv:Envelope>
|
212
|
+
XML
|
213
213
|
end
|
214
214
|
|
215
215
|
def parse(xml)
|
@@ -250,11 +250,11 @@ module ActiveMerchant #:nodoc:
|
|
250
250
|
'257' => STANDARD_ERROR_CODE[:invalid_cvc],
|
251
251
|
'333' => STANDARD_ERROR_CODE[:expired_card],
|
252
252
|
'1' => STANDARD_ERROR_CODE[:card_declined],
|
253
|
-
'99' => STANDARD_ERROR_CODE[:processing_error]
|
253
|
+
'99' => STANDARD_ERROR_CODE[:processing_error]
|
254
254
|
}
|
255
255
|
|
256
256
|
def authorization_from(request, response)
|
257
|
-
[
|
257
|
+
[response[:reference_number], request[:CardLastFourDigits], request[:Amount]].join('|')
|
258
258
|
end
|
259
259
|
|
260
260
|
def split_authorization(authorization)
|
@@ -277,6 +277,7 @@ module ActiveMerchant #:nodoc:
|
|
277
277
|
def cvv_result_code(xml)
|
278
278
|
cvv = validation_result_element(xml, 'CVV')
|
279
279
|
return nil unless cvv
|
280
|
+
|
280
281
|
validation_result_matches?(*validation_result_element_text(cvv.parent)) ? 'M' : 'N'
|
281
282
|
end
|
282
283
|
|
@@ -7,8 +7,8 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.default_currency = 'USD'
|
8
8
|
self.money_format = :cents
|
9
9
|
|
10
|
-
self.supported_countries = [
|
11
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_countries = %w[AD AT BE BG CH CY CZ DE DK EE ES FO FI FR GB GI GL GR HR HU IE IS IL IT LI LT LU LV MC MT NL NO PL PT RO SE SI SM SK SJ TR VA]
|
11
|
+
self.supported_cardtypes = %i[visa master american_express diners_club]
|
12
12
|
|
13
13
|
self.homepage_url = 'https://www.checkout.com/'
|
14
14
|
self.display_name = 'Checkout.com'
|
@@ -83,7 +83,7 @@ module ActiveMerchant #:nodoc:
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
-
def verify(credit_card, options={})
|
86
|
+
def verify(credit_card, options = {})
|
87
87
|
MultiResponse.run(:use_first_response) do |r|
|
88
88
|
r.process { authorize(100, credit_card, options) }
|
89
89
|
r.process(:ignore_result) { void(r.authorization, options) }
|
@@ -107,9 +107,7 @@ module ActiveMerchant #:nodoc:
|
|
107
107
|
xml.bill_cc_ payment_method.number
|
108
108
|
xml.bill_expmonth_ format(payment_method.month, :two_digits)
|
109
109
|
xml.bill_expyear_ format(payment_method.year, :four_digits)
|
110
|
-
if payment_method.verification_value?
|
111
|
-
xml.bill_cvv2_ payment_method.verification_value
|
112
|
-
end
|
110
|
+
xml.bill_cvv2_ payment_method.verification_value if payment_method.verification_value?
|
113
111
|
end
|
114
112
|
|
115
113
|
def add_billing_info(xml, options)
|
@@ -152,7 +150,7 @@ module ActiveMerchant #:nodoc:
|
|
152
150
|
end
|
153
151
|
|
154
152
|
def add_reference(xml, authorization)
|
155
|
-
transid, trackid,
|
153
|
+
transid, trackid, = split_authorization(authorization)
|
156
154
|
xml.transid transid
|
157
155
|
add_track_id(xml, trackid)
|
158
156
|
end
|
@@ -161,7 +159,7 @@ module ActiveMerchant #:nodoc:
|
|
161
159
|
xml.trackid(trackid) if trackid
|
162
160
|
end
|
163
161
|
|
164
|
-
def commit(action, amount=nil, options={}, &builder)
|
162
|
+
def commit(action, amount = nil, options = {}, &builder)
|
165
163
|
response = parse_xml(ssl_post(live_url, build_xml(action, &builder)))
|
166
164
|
Response.new(
|
167
165
|
(response[:responsecode] == '0'),
|
@@ -200,7 +198,7 @@ module ActiveMerchant #:nodoc:
|
|
200
198
|
response
|
201
199
|
end
|
202
200
|
|
203
|
-
def authorization_from(response, action,
|
201
|
+
def authorization_from(response, action, amount, options)
|
204
202
|
currency = options[:currency] || currency(amount)
|
205
203
|
[response[:tranid], response[:trackid], action, amount, currency].join('|')
|
206
204
|
end
|