swiss-crm-activemerchant 1.0.12
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 +7 -0
- data/CHANGELOG +4033 -0
- data/CONTRIBUTORS +568 -0
- data/MIT-LICENSE +20 -0
- data/README.md +252 -0
- data/lib/active_merchant/billing/apple_pay_payment_token.rb +22 -0
- data/lib/active_merchant/billing/avs_result.rb +95 -0
- data/lib/active_merchant/billing/base.rb +48 -0
- data/lib/active_merchant/billing/check.rb +112 -0
- data/lib/active_merchant/billing/compatibility.rb +118 -0
- data/lib/active_merchant/billing/credit_card.rb +451 -0
- data/lib/active_merchant/billing/credit_card_formatting.rb +24 -0
- data/lib/active_merchant/billing/credit_card_methods.rb +512 -0
- data/lib/active_merchant/billing/cvv_result.rb +37 -0
- data/lib/active_merchant/billing/gateway.rb +332 -0
- data/lib/active_merchant/billing/gateways/adyen.rb +774 -0
- 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 +205 -0
- data/lib/active_merchant/billing/gateways/authorize_net.rb +1125 -0
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +424 -0
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +977 -0
- data/lib/active_merchant/billing/gateways/axcessms.rb +242 -0
- data/lib/active_merchant/billing/gateways/balanced.rb +263 -0
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +222 -0
- data/lib/active_merchant/billing/gateways/bank_frick.rb +225 -0
- data/lib/active_merchant/billing/gateways/banwire.rb +116 -0
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +397 -0
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +15 -0
- data/lib/active_merchant/billing/gateways/be2bill.rb +131 -0
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +474 -0
- data/lib/active_merchant/billing/gateways/beanstream.rb +238 -0
- data/lib/active_merchant/billing/gateways/beanstream_interac.rb +57 -0
- data/lib/active_merchant/billing/gateways/blue_pay.rb +549 -0
- data/lib/active_merchant/billing/gateways/blue_snap.rb +644 -0
- data/lib/active_merchant/billing/gateways/bogus.rb +190 -0
- data/lib/active_merchant/billing/gateways/borgun.rb +272 -0
- data/lib/active_merchant/billing/gateways/bpoint.rb +277 -0
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +28 -0
- data/lib/active_merchant/billing/gateways/braintree/token_nonce.rb +113 -0
- data/lib/active_merchant/billing/gateways/braintree.rb +19 -0
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +952 -0
- data/lib/active_merchant/billing/gateways/braintree_orange.rb +19 -0
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +244 -0
- data/lib/active_merchant/billing/gateways/cams.rb +230 -0
- data/lib/active_merchant/billing/gateways/card_connect.rb +338 -0
- data/lib/active_merchant/billing/gateways/card_save.rb +21 -0
- data/lib/active_merchant/billing/gateways/card_stream.rb +394 -0
- data/lib/active_merchant/billing/gateways/cardknox.rb +327 -0
- data/lib/active_merchant/billing/gateways/cardprocess.rb +256 -0
- data/lib/active_merchant/billing/gateways/cashnet.rb +235 -0
- data/lib/active_merchant/billing/gateways/cc5.rb +198 -0
- data/lib/active_merchant/billing/gateways/cecabank.rb +249 -0
- data/lib/active_merchant/billing/gateways/cenpos.rb +328 -0
- data/lib/active_merchant/billing/gateways/checkout.rb +212 -0
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +587 -0
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +21 -0
- data/lib/active_merchant/billing/gateways/clearhaus.rb +219 -0
- data/lib/active_merchant/billing/gateways/commerce_hub.rb +366 -0
- data/lib/active_merchant/billing/gateways/commercegate.rb +142 -0
- data/lib/active_merchant/billing/gateways/conekta.rb +230 -0
- data/lib/active_merchant/billing/gateways/creditcall.rb +272 -0
- data/lib/active_merchant/billing/gateways/credorax.rb +526 -0
- data/lib/active_merchant/billing/gateways/ct_payment.rb +269 -0
- data/lib/active_merchant/billing/gateways/culqi.rb +279 -0
- data/lib/active_merchant/billing/gateways/cyber_source/cyber_source_common.rb +36 -0
- data/lib/active_merchant/billing/gateways/cyber_source.rb +1148 -0
- data/lib/active_merchant/billing/gateways/cyber_source_rest.rb +454 -0
- data/lib/active_merchant/billing/gateways/d_local.rb +343 -0
- data/lib/active_merchant/billing/gateways/data_cash.rb +302 -0
- 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 +199 -0
- data/lib/active_merchant/billing/gateways/digitzs.rb +295 -0
- data/lib/active_merchant/billing/gateways/ebanx.rb +346 -0
- data/lib/active_merchant/billing/gateways/efsnet.rb +215 -0
- data/lib/active_merchant/billing/gateways/elavon.rb +475 -0
- data/lib/active_merchant/billing/gateways/element.rb +406 -0
- data/lib/active_merchant/billing/gateways/epay.rb +296 -0
- data/lib/active_merchant/billing/gateways/evo_ca.rb +307 -0
- data/lib/active_merchant/billing/gateways/eway.rb +226 -0
- data/lib/active_merchant/billing/gateways/eway_managed.rb +289 -0
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +578 -0
- data/lib/active_merchant/billing/gateways/exact.rb +219 -0
- data/lib/active_merchant/billing/gateways/ezic.rb +195 -0
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +223 -0
- data/lib/active_merchant/billing/gateways/federated_canada.rb +158 -0
- data/lib/active_merchant/billing/gateways/finansbank.rb +22 -0
- data/lib/active_merchant/billing/gateways/first_giving.rb +143 -0
- data/lib/active_merchant/billing/gateways/first_pay.rb +182 -0
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +452 -0
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +505 -0
- data/lib/active_merchant/billing/gateways/flo2cash.rb +215 -0
- data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +20 -0
- data/lib/active_merchant/billing/gateways/fluidpay.rb +275 -0
- data/lib/active_merchant/billing/gateways/forte.rb +286 -0
- data/lib/active_merchant/billing/gateways/garanti.rb +256 -0
- data/lib/active_merchant/billing/gateways/global_collect.rb +580 -0
- data/lib/active_merchant/billing/gateways/global_transport.rb +193 -0
- data/lib/active_merchant/billing/gateways/hdfc.rb +205 -0
- data/lib/active_merchant/billing/gateways/hps.rb +472 -0
- data/lib/active_merchant/billing/gateways/iats_payments.rb +312 -0
- data/lib/active_merchant/billing/gateways/in_context_paypal_express.rb +15 -0
- data/lib/active_merchant/billing/gateways/inspire.rb +213 -0
- data/lib/active_merchant/billing/gateways/instapay.rb +159 -0
- data/lib/active_merchant/billing/gateways/ipg.rb +420 -0
- data/lib/active_merchant/billing/gateways/ipp.rb +176 -0
- data/lib/active_merchant/billing/gateways/iridium.rb +467 -0
- data/lib/active_merchant/billing/gateways/itransact.rb +448 -0
- data/lib/active_merchant/billing/gateways/iveri.rb +290 -0
- data/lib/active_merchant/billing/gateways/ixopay.rb +320 -0
- data/lib/active_merchant/billing/gateways/jetpay.rb +395 -0
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +432 -0
- data/lib/active_merchant/billing/gateways/klarna.rb +317 -0
- data/lib/active_merchant/billing/gateways/komoju.rb +115 -0
- data/lib/active_merchant/billing/gateways/kushki.rb +297 -0
- data/lib/active_merchant/billing/gateways/latitude19.rb +412 -0
- data/lib/active_merchant/billing/gateways/linkpoint.rb +448 -0
- data/lib/active_merchant/billing/gateways/litle.rb +643 -0
- data/lib/active_merchant/billing/gateways/mastercard.rb +286 -0
- data/lib/active_merchant/billing/gateways/maxipago.rb +220 -0
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +348 -0
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +228 -0
- data/lib/active_merchant/billing/gateways/merchant_one.rb +110 -0
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +245 -0
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +313 -0
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +284 -0
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +248 -0
- data/lib/active_merchant/billing/gateways/mercury.rb +352 -0
- data/lib/active_merchant/billing/gateways/metrics_global.rb +293 -0
- data/lib/active_merchant/billing/gateways/micropayment.rb +182 -0
- data/lib/active_merchant/billing/gateways/migs/migs_codes.rb +100 -0
- data/lib/active_merchant/billing/gateways/migs.rb +329 -0
- data/lib/active_merchant/billing/gateways/mit.rb +260 -0
- data/lib/active_merchant/billing/gateways/modern_payments.rb +37 -0
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +215 -0
- data/lib/active_merchant/billing/gateways/moka.rb +290 -0
- data/lib/active_merchant/billing/gateways/monei.rb +424 -0
- data/lib/active_merchant/billing/gateways/moneris.rb +488 -0
- data/lib/active_merchant/billing/gateways/money_movers.rb +150 -0
- data/lib/active_merchant/billing/gateways/mundipagg.rb +366 -0
- data/lib/active_merchant/billing/gateways/nab_transact.rb +299 -0
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +163 -0
- data/lib/active_merchant/billing/gateways/net_registry.rb +198 -0
- data/lib/active_merchant/billing/gateways/netaxept.rb +180 -0
- data/lib/active_merchant/billing/gateways/netbanx.rb +376 -0
- data/lib/active_merchant/billing/gateways/netbilling.rb +229 -0
- data/lib/active_merchant/billing/gateways/netpay.rb +223 -0
- data/lib/active_merchant/billing/gateways/network_merchants.rb +238 -0
- data/lib/active_merchant/billing/gateways/nmi.rb +396 -0
- data/lib/active_merchant/billing/gateways/ogone.rb +509 -0
- data/lib/active_merchant/billing/gateways/omise.rb +323 -0
- data/lib/active_merchant/billing/gateways/openpay.rb +246 -0
- data/lib/active_merchant/billing/gateways/opp.rb +394 -0
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +331 -0
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +45 -0
- data/lib/active_merchant/billing/gateways/orbital.rb +1267 -0
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +206 -0
- data/lib/active_merchant/billing/gateways/pagarme.rb +239 -0
- data/lib/active_merchant/billing/gateways/pago_facil.rb +120 -0
- data/lib/active_merchant/billing/gateways/pay_arc.rb +392 -0
- data/lib/active_merchant/billing/gateways/pay_conex.rb +245 -0
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +277 -0
- data/lib/active_merchant/billing/gateways/pay_hub.rb +213 -0
- data/lib/active_merchant/billing/gateways/pay_junction.rb +390 -0
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +206 -0
- data/lib/active_merchant/billing/gateways/pay_secure.rb +110 -0
- data/lib/active_merchant/billing/gateways/pay_trace.rb +450 -0
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +224 -0
- data/lib/active_merchant/billing/gateways/payeezy.rb +513 -0
- data/lib/active_merchant/billing/gateways/payex.rb +409 -0
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +235 -0
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +42 -0
- data/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +13 -0
- data/lib/active_merchant/billing/gateways/payflow.rb +473 -0
- data/lib/active_merchant/billing/gateways/payflow_express.rb +220 -0
- data/lib/active_merchant/billing/gateways/payflow_express_uk.rb +14 -0
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +20 -0
- data/lib/active_merchant/billing/gateways/payment_express.rb +373 -0
- data/lib/active_merchant/billing/gateways/paymentez.rb +365 -0
- data/lib/active_merchant/billing/gateways/paymill.rb +369 -0
- data/lib/active_merchant/billing/gateways/paynetworx.rb +228 -0
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +718 -0
- data/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb +69 -0
- data/lib/active_merchant/billing/gateways/paypal/paypal_recurring_api.rb +262 -0
- data/lib/active_merchant/billing/gateways/paypal.rb +136 -0
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +13 -0
- data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +44 -0
- data/lib/active_merchant/billing/gateways/paypal_express.rb +272 -0
- data/lib/active_merchant/billing/gateways/paypal_express_common.rb +30 -0
- data/lib/active_merchant/billing/gateways/paypal_standard.rb +281 -0
- data/lib/active_merchant/billing/gateways/paysafe.rb +420 -0
- data/lib/active_merchant/billing/gateways/payscout.rb +159 -0
- data/lib/active_merchant/billing/gateways/paystation.rb +204 -0
- data/lib/active_merchant/billing/gateways/payu_in.rb +249 -0
- data/lib/active_merchant/billing/gateways/payu_latam.rb +482 -0
- data/lib/active_merchant/billing/gateways/payway.rb +207 -0
- data/lib/active_merchant/billing/gateways/payway_dot_com.rb +253 -0
- data/lib/active_merchant/billing/gateways/pin.rb +273 -0
- data/lib/active_merchant/billing/gateways/pixxels.rb +263 -0
- data/lib/active_merchant/billing/gateways/plexo.rb +308 -0
- data/lib/active_merchant/billing/gateways/plugnpay.rb +283 -0
- data/lib/active_merchant/billing/gateways/priority.rb +392 -0
- data/lib/active_merchant/billing/gateways/pro_pay.rb +325 -0
- data/lib/active_merchant/billing/gateways/psigate.rb +227 -0
- data/lib/active_merchant/billing/gateways/psl_card.rb +295 -0
- data/lib/active_merchant/billing/gateways/qbms.rb +302 -0
- data/lib/active_merchant/billing/gateways/quantum.rb +274 -0
- data/lib/active_merchant/billing/gateways/quickbooks.rb +377 -0
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +184 -0
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +297 -0
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +226 -0
- data/lib/active_merchant/billing/gateways/quickpay.rb +24 -0
- data/lib/active_merchant/billing/gateways/qvalent.rb +305 -0
- 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 +400 -0
- data/lib/active_merchant/billing/gateways/redsys.rb +723 -0
- data/lib/active_merchant/billing/gateways/s5.rb +247 -0
- data/lib/active_merchant/billing/gateways/safe_charge.rb +298 -0
- data/lib/active_merchant/billing/gateways/sage.rb +446 -0
- data/lib/active_merchant/billing/gateways/sage_pay.rb +434 -0
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +141 -0
- data/lib/active_merchant/billing/gateways/secure_net.rb +260 -0
- data/lib/active_merchant/billing/gateways/secure_pay.rb +191 -0
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +290 -0
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +103 -0
- data/lib/active_merchant/billing/gateways/securion_pay.rb +305 -0
- 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 +450 -0
- data/lib/active_merchant/billing/gateways/smart_ps.rb +274 -0
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +194 -0
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +354 -0
- data/lib/active_merchant/billing/gateways/stripe.rb +866 -0
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +602 -0
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +151 -0
- data/lib/active_merchant/billing/gateways/telr.rb +273 -0
- data/lib/active_merchant/billing/gateways/tns.rb +23 -0
- data/lib/active_merchant/billing/gateways/trans_first.rb +240 -0
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +612 -0
- data/lib/active_merchant/billing/gateways/transact_pro.rb +222 -0
- data/lib/active_merchant/billing/gateways/transax.rb +21 -0
- data/lib/active_merchant/billing/gateways/transnational.rb +9 -0
- data/lib/active_merchant/billing/gateways/trexle.rb +221 -0
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +500 -0
- data/lib/active_merchant/billing/gateways/usa_epay.rb +24 -0
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +1612 -0
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +367 -0
- data/lib/active_merchant/billing/gateways/vanco.rb +303 -0
- data/lib/active_merchant/billing/gateways/verifi.rb +224 -0
- data/lib/active_merchant/billing/gateways/viaklix.rb +171 -0
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +250 -0
- data/lib/active_merchant/billing/gateways/vpos.rb +223 -0
- data/lib/active_merchant/billing/gateways/webpay.rb +97 -0
- data/lib/active_merchant/billing/gateways/wepay.rb +235 -0
- data/lib/active_merchant/billing/gateways/wirecard.rb +430 -0
- data/lib/active_merchant/billing/gateways/wompi.rb +197 -0
- data/lib/active_merchant/billing/gateways/world_net.rb +345 -0
- data/lib/active_merchant/billing/gateways/worldpay.rb +1050 -0
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +208 -0
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +221 -0
- data/lib/active_merchant/billing/gateways.rb +14 -0
- data/lib/active_merchant/billing/model.rb +30 -0
- data/lib/active_merchant/billing/network_tokenization_credit_card.rb +39 -0
- data/lib/active_merchant/billing/payment_token.rb +21 -0
- data/lib/active_merchant/billing/rails.rb +3 -0
- data/lib/active_merchant/billing/response.rb +121 -0
- data/lib/active_merchant/billing/three_d_secure_eci_mapper.rb +27 -0
- data/lib/active_merchant/billing.rb +16 -0
- data/lib/active_merchant/connection.rb +194 -0
- data/lib/active_merchant/country.rb +338 -0
- data/lib/active_merchant/empty.rb +20 -0
- data/lib/active_merchant/errors.rb +38 -0
- data/lib/active_merchant/net_http_ssl_connection.rb +11 -0
- data/lib/active_merchant/network_connection_retries.rb +78 -0
- data/lib/active_merchant/post_data.rb +26 -0
- data/lib/active_merchant/posts_data.rb +92 -0
- data/lib/active_merchant/version.rb +3 -0
- data/lib/active_merchant.rb +63 -0
- data/lib/activemerchant.rb +1 -0
- data/lib/certs/cacert.pem +3214 -0
- data/lib/support/gateway_support.rb +69 -0
- data/lib/support/outbound_hosts.rb +28 -0
- data/lib/support/ssl_verify.rb +88 -0
- data/lib/support/ssl_version.rb +86 -0
- metadata +506 -0
@@ -0,0 +1,434 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
class SagePayGateway < Gateway
|
4
|
+
cattr_accessor :simulate
|
5
|
+
self.simulate = false
|
6
|
+
|
7
|
+
class_attribute :simulator_url
|
8
|
+
|
9
|
+
self.test_url = 'https://test.sagepay.com/gateway/service'
|
10
|
+
self.live_url = 'https://live.sagepay.com/gateway/service'
|
11
|
+
self.simulator_url = 'https://test.sagepay.com/Simulator'
|
12
|
+
|
13
|
+
APPROVED = 'OK'
|
14
|
+
|
15
|
+
TRANSACTIONS = {
|
16
|
+
purchase: 'PAYMENT',
|
17
|
+
credit: 'REFUND',
|
18
|
+
authorization: 'DEFERRED',
|
19
|
+
capture: 'RELEASE',
|
20
|
+
void: 'VOID',
|
21
|
+
abort: 'ABORT',
|
22
|
+
store: 'TOKEN',
|
23
|
+
unstore: 'REMOVETOKEN',
|
24
|
+
repeat: 'REPEAT'
|
25
|
+
}
|
26
|
+
|
27
|
+
CREDIT_CARDS = {
|
28
|
+
visa: 'VISA',
|
29
|
+
master: 'MC',
|
30
|
+
delta: 'DELTA',
|
31
|
+
maestro: 'MAESTRO',
|
32
|
+
american_express: 'AMEX',
|
33
|
+
electron: 'UKE',
|
34
|
+
diners_club: 'DC',
|
35
|
+
jcb: 'JCB'
|
36
|
+
}
|
37
|
+
|
38
|
+
AVS_CODE = {
|
39
|
+
'NOTPROVIDED' => nil,
|
40
|
+
'NOTCHECKED' => 'X',
|
41
|
+
'MATCHED' => 'Y',
|
42
|
+
'NOTMATCHED' => 'N'
|
43
|
+
}
|
44
|
+
|
45
|
+
CVV_CODE = {
|
46
|
+
'NOTPROVIDED' => 'S',
|
47
|
+
'NOTCHECKED' => 'X',
|
48
|
+
'MATCHED' => 'M',
|
49
|
+
'NOTMATCHED' => 'N'
|
50
|
+
}
|
51
|
+
|
52
|
+
OPTIONAL_REQUEST_FIELDS = {
|
53
|
+
paypal_callback_url: :PayPalCallbackURL,
|
54
|
+
basket: :Basket,
|
55
|
+
gift_aid_payment: :GiftAidPayment,
|
56
|
+
apply_avscv2: :ApplyAVSCV2,
|
57
|
+
apply_3d_secure: :Apply3DSecure,
|
58
|
+
account_type: :AccountType,
|
59
|
+
billing_agreement: :BillingAgreement,
|
60
|
+
basket_xml: :BasketXML,
|
61
|
+
customer_xml: :CustomerXML,
|
62
|
+
surcharge_xml: :SurchargeXML,
|
63
|
+
vendor_data: :VendorData,
|
64
|
+
language: :Language,
|
65
|
+
website: :Website,
|
66
|
+
recipient_account_number: :FIRecipientAcctNumber,
|
67
|
+
recipient_surname: :FIRecipientSurname,
|
68
|
+
recipient_postcode: :FIRecipientPostcode,
|
69
|
+
recipient_dob: :FIRecipientDoB
|
70
|
+
}
|
71
|
+
|
72
|
+
self.supported_countries = %w[GB IE]
|
73
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb maestro diners_club]
|
74
|
+
self.default_currency = 'GBP'
|
75
|
+
|
76
|
+
self.homepage_url = 'http://www.sagepay.com'
|
77
|
+
self.display_name = 'SagePay'
|
78
|
+
|
79
|
+
def initialize(options = {})
|
80
|
+
requires!(options, :login)
|
81
|
+
super
|
82
|
+
end
|
83
|
+
|
84
|
+
def purchase(money, payment_method, options = {})
|
85
|
+
requires!(options, :order_id)
|
86
|
+
|
87
|
+
post = {}
|
88
|
+
|
89
|
+
add_amount(post, money, options)
|
90
|
+
add_invoice(post, options)
|
91
|
+
add_payment_method(post, payment_method, options)
|
92
|
+
add_address(post, options)
|
93
|
+
add_customer_data(post, options)
|
94
|
+
add_optional_data(post, options)
|
95
|
+
|
96
|
+
commit((past_purchase_reference?(payment_method) ? :repeat : :purchase), post)
|
97
|
+
end
|
98
|
+
|
99
|
+
def authorize(money, payment_method, options = {})
|
100
|
+
requires!(options, :order_id)
|
101
|
+
|
102
|
+
post = {}
|
103
|
+
|
104
|
+
add_amount(post, money, options)
|
105
|
+
add_invoice(post, options)
|
106
|
+
add_payment_method(post, payment_method, options)
|
107
|
+
add_address(post, options)
|
108
|
+
add_customer_data(post, options)
|
109
|
+
add_optional_data(post, options)
|
110
|
+
|
111
|
+
commit(:authorization, post)
|
112
|
+
end
|
113
|
+
|
114
|
+
# You can only capture a transaction once, even if you didn't capture the full amount the first time.
|
115
|
+
def capture(money, identification, options = {})
|
116
|
+
post = {}
|
117
|
+
|
118
|
+
add_reference(post, identification)
|
119
|
+
add_release_amount(post, money, options)
|
120
|
+
|
121
|
+
commit(:capture, post)
|
122
|
+
end
|
123
|
+
|
124
|
+
def void(identification, options = {})
|
125
|
+
post = {}
|
126
|
+
|
127
|
+
add_reference(post, identification)
|
128
|
+
action = abort_or_void_from(identification)
|
129
|
+
|
130
|
+
commit(action, post)
|
131
|
+
end
|
132
|
+
|
133
|
+
# Refunding requires a new order_id to passed in, as well as a description
|
134
|
+
def refund(money, identification, options = {})
|
135
|
+
requires!(options, :order_id, :description)
|
136
|
+
|
137
|
+
post = {}
|
138
|
+
|
139
|
+
add_related_reference(post, identification)
|
140
|
+
add_amount(post, money, options)
|
141
|
+
add_invoice(post, options)
|
142
|
+
|
143
|
+
commit(:credit, post)
|
144
|
+
end
|
145
|
+
|
146
|
+
def credit(money, identification, options = {})
|
147
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
148
|
+
refund(money, identification, options)
|
149
|
+
end
|
150
|
+
|
151
|
+
def store(credit_card, options = {})
|
152
|
+
post = {}
|
153
|
+
add_credit_card(post, credit_card)
|
154
|
+
add_currency(post, 0, options)
|
155
|
+
|
156
|
+
commit(:store, post)
|
157
|
+
end
|
158
|
+
|
159
|
+
def unstore(token, options = {})
|
160
|
+
post = {}
|
161
|
+
add_token(post, token)
|
162
|
+
commit(:unstore, post)
|
163
|
+
end
|
164
|
+
|
165
|
+
def verify(credit_card, options = {})
|
166
|
+
MultiResponse.run(:use_first_response) do |r|
|
167
|
+
r.process { authorize(100, credit_card, options) }
|
168
|
+
r.process(:ignore_result) { void(r.authorization, options) }
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
def supports_scrubbing
|
173
|
+
true
|
174
|
+
end
|
175
|
+
|
176
|
+
def scrub(transcript)
|
177
|
+
transcript.
|
178
|
+
gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]').
|
179
|
+
gsub(%r((&?CardNumber=)\d+(&?)), '\1[FILTERED]\2').
|
180
|
+
gsub(%r((&?CV2=)\d+(&?)), '\1[FILTERED]\2')
|
181
|
+
end
|
182
|
+
|
183
|
+
private
|
184
|
+
|
185
|
+
def truncate(value, max_size)
|
186
|
+
return nil unless value
|
187
|
+
return value.to_s if CGI.escape(value.to_s).length <= max_size
|
188
|
+
|
189
|
+
if value.size > max_size
|
190
|
+
truncate(super(value, max_size), max_size)
|
191
|
+
else
|
192
|
+
truncate(value.to_s.chop, max_size)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
def add_reference(post, identification)
|
197
|
+
order_id, transaction_id, authorization, security_key = identification.split(';')
|
198
|
+
|
199
|
+
add_pair(post, :VendorTxCode, order_id)
|
200
|
+
add_pair(post, :VPSTxId, transaction_id)
|
201
|
+
add_pair(post, :TxAuthNo, authorization)
|
202
|
+
add_pair(post, :SecurityKey, security_key)
|
203
|
+
end
|
204
|
+
|
205
|
+
def add_related_reference(post, identification)
|
206
|
+
order_id, transaction_id, authorization, security_key = identification.split(';')
|
207
|
+
|
208
|
+
add_pair(post, :RelatedVendorTxCode, order_id)
|
209
|
+
add_pair(post, :RelatedVPSTxId, transaction_id)
|
210
|
+
add_pair(post, :RelatedTxAuthNo, authorization)
|
211
|
+
add_pair(post, :RelatedSecurityKey, security_key)
|
212
|
+
end
|
213
|
+
|
214
|
+
def add_amount(post, money, options)
|
215
|
+
currency = options[:currency] || currency(money)
|
216
|
+
add_pair(post, :Amount, localized_amount(money, currency), required: true)
|
217
|
+
add_pair(post, :Currency, currency, required: true)
|
218
|
+
end
|
219
|
+
|
220
|
+
def add_currency(post, money, options)
|
221
|
+
currency = options[:currency] || currency(money)
|
222
|
+
add_pair(post, :Currency, currency, required: true)
|
223
|
+
end
|
224
|
+
|
225
|
+
# doesn't actually use the currency -- dodgy!
|
226
|
+
def add_release_amount(post, money, options)
|
227
|
+
add_pair(post, :ReleaseAmount, amount(money), required: true)
|
228
|
+
end
|
229
|
+
|
230
|
+
def add_customer_data(post, options)
|
231
|
+
add_pair(post, :CustomerEMail, truncate(options[:email], 255)) unless options[:email].blank?
|
232
|
+
add_pair(post, :ClientIPAddress, options[:ip])
|
233
|
+
end
|
234
|
+
|
235
|
+
def add_optional_data(post, options)
|
236
|
+
add_pair(post, :CreateToken, 1) unless options[:store].blank?
|
237
|
+
|
238
|
+
OPTIONAL_REQUEST_FIELDS.each do |gateway_option, sagepay_field|
|
239
|
+
add_pair(post, sagepay_field, options[gateway_option])
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
243
|
+
def add_address(post, options)
|
244
|
+
if billing_address = options[:billing_address] || options[:address]
|
245
|
+
first_name, last_name = split_names(billing_address[:name])
|
246
|
+
add_pair(post, :BillingSurname, truncate(last_name, 20))
|
247
|
+
add_pair(post, :BillingFirstnames, truncate(first_name, 20))
|
248
|
+
add_pair(post, :BillingAddress1, truncate(billing_address[:address1], 100))
|
249
|
+
add_pair(post, :BillingAddress2, truncate(billing_address[:address2], 100))
|
250
|
+
add_pair(post, :BillingCity, truncate(billing_address[:city], 40))
|
251
|
+
add_pair(post, :BillingState, truncate(billing_address[:state], 2)) if usa?(billing_address[:country])
|
252
|
+
add_pair(post, :BillingCountry, truncate(billing_address[:country], 2))
|
253
|
+
add_pair(post, :BillingPhone, sanitize_phone(billing_address[:phone]))
|
254
|
+
add_pair(post, :BillingPostCode, truncate(billing_address[:zip], 10))
|
255
|
+
end
|
256
|
+
|
257
|
+
if shipping_address = options[:shipping_address] || billing_address
|
258
|
+
first_name, last_name = split_names(shipping_address[:name])
|
259
|
+
add_pair(post, :DeliverySurname, truncate(last_name, 20))
|
260
|
+
add_pair(post, :DeliveryFirstnames, truncate(first_name, 20))
|
261
|
+
add_pair(post, :DeliveryAddress1, truncate(shipping_address[:address1], 100))
|
262
|
+
add_pair(post, :DeliveryAddress2, truncate(shipping_address[:address2], 100))
|
263
|
+
add_pair(post, :DeliveryCity, truncate(shipping_address[:city], 40))
|
264
|
+
add_pair(post, :DeliveryState, truncate(shipping_address[:state], 2)) if usa?(shipping_address[:country])
|
265
|
+
add_pair(post, :DeliveryCountry, truncate(shipping_address[:country], 2))
|
266
|
+
add_pair(post, :DeliveryPhone, sanitize_phone(shipping_address[:phone]))
|
267
|
+
add_pair(post, :DeliveryPostCode, truncate(shipping_address[:zip], 10))
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
271
|
+
def add_invoice(post, options)
|
272
|
+
add_pair(post, :VendorTxCode, sanitize_order_id(options[:order_id]), required: true)
|
273
|
+
add_pair(post, :Description, truncate(options[:description] || options[:order_id], 100))
|
274
|
+
end
|
275
|
+
|
276
|
+
def add_payment_method(post, payment_method, options)
|
277
|
+
if payment_method.is_a?(String)
|
278
|
+
if past_purchase_reference?(payment_method)
|
279
|
+
add_related_reference(post, payment_method)
|
280
|
+
else
|
281
|
+
add_token_details(post, payment_method, options)
|
282
|
+
end
|
283
|
+
else
|
284
|
+
add_credit_card(post, payment_method)
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
def add_credit_card(post, credit_card)
|
289
|
+
add_pair(post, :CardHolder, truncate(credit_card.name, 50), required: true)
|
290
|
+
add_pair(post, :CardNumber, credit_card.number, required: true)
|
291
|
+
|
292
|
+
add_pair(post, :ExpiryDate, format_date(credit_card.month, credit_card.year), required: true)
|
293
|
+
add_pair(post, :CardType, map_card_type(credit_card))
|
294
|
+
|
295
|
+
add_pair(post, :CV2, credit_card.verification_value)
|
296
|
+
end
|
297
|
+
|
298
|
+
def add_token_details(post, token, options)
|
299
|
+
add_token(post, token)
|
300
|
+
add_pair(post, :StoreToken, options[:customer])
|
301
|
+
add_pair(post, :CV2, options[:verification_value])
|
302
|
+
end
|
303
|
+
|
304
|
+
def add_token(post, token)
|
305
|
+
add_pair(post, :Token, token)
|
306
|
+
end
|
307
|
+
|
308
|
+
def sanitize_order_id(order_id)
|
309
|
+
cleansed = order_id.to_s.gsub(/[^-a-zA-Z0-9._]/, '')
|
310
|
+
truncate(cleansed, 40)
|
311
|
+
end
|
312
|
+
|
313
|
+
def sanitize_phone(phone)
|
314
|
+
return nil unless phone
|
315
|
+
|
316
|
+
cleansed = phone.to_s.gsub(/[^0-9+]/, '')
|
317
|
+
truncate(cleansed, 20)
|
318
|
+
end
|
319
|
+
|
320
|
+
def usa?(country)
|
321
|
+
truncate(country, 2) == 'US'
|
322
|
+
end
|
323
|
+
|
324
|
+
def map_card_type(credit_card)
|
325
|
+
raise ArgumentError, 'The credit card type must be provided' if card_brand(credit_card).blank?
|
326
|
+
|
327
|
+
card_type = card_brand(credit_card).to_sym
|
328
|
+
|
329
|
+
if card_type == :visa && credit_card.electron?
|
330
|
+
CREDIT_CARDS[:electron]
|
331
|
+
else
|
332
|
+
CREDIT_CARDS[card_type]
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
# MMYY format
|
337
|
+
def format_date(month, year)
|
338
|
+
return nil if year.blank? || month.blank?
|
339
|
+
|
340
|
+
year = sprintf('%.4i', year)
|
341
|
+
month = sprintf('%.2i', month)
|
342
|
+
|
343
|
+
"#{month}#{year[-2..-1]}"
|
344
|
+
end
|
345
|
+
|
346
|
+
def commit(action, parameters)
|
347
|
+
response = parse(ssl_post(url_for(action), post_data(action, parameters)))
|
348
|
+
|
349
|
+
Response.new(response['Status'] == APPROVED, message_from(response), response,
|
350
|
+
test: test?,
|
351
|
+
authorization: authorization_from(response, parameters, action),
|
352
|
+
avs_result: {
|
353
|
+
street_match: AVS_CODE[response['AddressResult']],
|
354
|
+
postal_match: AVS_CODE[response['PostCodeResult']]
|
355
|
+
},
|
356
|
+
cvv_result: CVV_CODE[response['CV2Result']])
|
357
|
+
end
|
358
|
+
|
359
|
+
def authorization_from(response, params, action)
|
360
|
+
case action
|
361
|
+
when :store
|
362
|
+
response['Token']
|
363
|
+
else
|
364
|
+
[params[:VendorTxCode],
|
365
|
+
response['VPSTxId'] || params[:VPSTxId],
|
366
|
+
response['TxAuthNo'],
|
367
|
+
response['SecurityKey'] || params[:SecurityKey],
|
368
|
+
action].join(';')
|
369
|
+
end
|
370
|
+
end
|
371
|
+
|
372
|
+
def abort_or_void_from(identification)
|
373
|
+
original_transaction = identification.split(';').last
|
374
|
+
original_transaction == 'authorization' ? :abort : :void
|
375
|
+
end
|
376
|
+
|
377
|
+
def url_for(action)
|
378
|
+
simulate ? build_simulator_url(action) : build_url(action)
|
379
|
+
end
|
380
|
+
|
381
|
+
def build_url(action)
|
382
|
+
endpoint =
|
383
|
+
case action
|
384
|
+
when :purchase, :authorization then 'vspdirect-register'
|
385
|
+
when :store then 'directtoken'
|
386
|
+
else TRANSACTIONS[action].downcase
|
387
|
+
end
|
388
|
+
"#{test? ? self.test_url : self.live_url}/#{endpoint}.vsp"
|
389
|
+
end
|
390
|
+
|
391
|
+
def build_simulator_url(action)
|
392
|
+
endpoint = %i[purchase authorization].include?(action) ? 'VSPDirectGateway.asp' : "VSPServerGateway.asp?Service=Vendor#{TRANSACTIONS[action].capitalize}Tx"
|
393
|
+
"#{self.simulator_url}/#{endpoint}"
|
394
|
+
end
|
395
|
+
|
396
|
+
def message_from(response)
|
397
|
+
response['Status'] == APPROVED ? 'Success' : (response['StatusDetail'] || 'Unspecified error') # simonr 20080207 can't actually get non-nil blanks, so this is shorter
|
398
|
+
end
|
399
|
+
|
400
|
+
def post_data(action, parameters = {})
|
401
|
+
parameters.update(
|
402
|
+
Vendor: @options[:login],
|
403
|
+
TxType: TRANSACTIONS[action],
|
404
|
+
VPSProtocol: @options.fetch(:protocol_version, '3.00')
|
405
|
+
)
|
406
|
+
|
407
|
+
parameters.update(ReferrerID: application_id) if application_id && (application_id != Gateway.application_id)
|
408
|
+
|
409
|
+
parameters.collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join('&')
|
410
|
+
end
|
411
|
+
|
412
|
+
# SagePay returns data in the following format
|
413
|
+
# Key1=value1
|
414
|
+
# Key2=value2
|
415
|
+
def parse(body)
|
416
|
+
result = {}
|
417
|
+
body.to_s.each_line do |pair|
|
418
|
+
result[$1] = $2 if pair.strip =~ /\A([^=]+)=(.+)\Z/im
|
419
|
+
end
|
420
|
+
result
|
421
|
+
end
|
422
|
+
|
423
|
+
def add_pair(post, key, value, options = {})
|
424
|
+
post[key] = value if !value.blank? || options[:required]
|
425
|
+
end
|
426
|
+
|
427
|
+
def past_purchase_reference?(payment_method)
|
428
|
+
return false unless payment_method.is_a?(String)
|
429
|
+
|
430
|
+
%w(purchase repeat).include?(payment_method.split(';').last)
|
431
|
+
end
|
432
|
+
end
|
433
|
+
end
|
434
|
+
end
|
@@ -0,0 +1,141 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
class SallieMaeGateway < Gateway
|
4
|
+
self.live_url = self.test_url = 'https://trans.salliemae.com/cgi-bin/process.cgi'
|
5
|
+
|
6
|
+
# The countries the gateway supports merchants from as 2 digit ISO country codes
|
7
|
+
self.supported_countries = ['US']
|
8
|
+
|
9
|
+
# The card types supported by the payment gateway
|
10
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
11
|
+
|
12
|
+
# The homepage URL of the gateway
|
13
|
+
self.homepage_url = 'http://www.salliemae.com/'
|
14
|
+
|
15
|
+
# The name of the gateway
|
16
|
+
self.display_name = 'Sallie Mae'
|
17
|
+
|
18
|
+
def initialize(options = {})
|
19
|
+
requires!(options, :login)
|
20
|
+
super
|
21
|
+
end
|
22
|
+
|
23
|
+
def test?
|
24
|
+
@options[:login] == 'TEST0'
|
25
|
+
end
|
26
|
+
|
27
|
+
def authorize(money, creditcard, options = {})
|
28
|
+
post = PostData.new
|
29
|
+
add_invoice(post, options)
|
30
|
+
add_creditcard(post, creditcard)
|
31
|
+
add_address(post, creditcard, options)
|
32
|
+
add_customer_data(post, options)
|
33
|
+
|
34
|
+
commit(:authonly, money, post)
|
35
|
+
end
|
36
|
+
|
37
|
+
def purchase(money, creditcard, options = {})
|
38
|
+
post = PostData.new
|
39
|
+
add_invoice(post, options)
|
40
|
+
add_creditcard(post, creditcard)
|
41
|
+
add_address(post, creditcard, options)
|
42
|
+
add_customer_data(post, options)
|
43
|
+
|
44
|
+
commit(:sale, money, post)
|
45
|
+
end
|
46
|
+
|
47
|
+
def capture(money, authorization, options = {})
|
48
|
+
post = PostData.new
|
49
|
+
post[:postonly] = authorization
|
50
|
+
commit(:capture, money, post)
|
51
|
+
end
|
52
|
+
|
53
|
+
private
|
54
|
+
|
55
|
+
def add_customer_data(post, options)
|
56
|
+
if address = options[:billing_address] || options[:shipping_address] || options[:address]
|
57
|
+
post[:ci_phone] = address[:phone].to_s
|
58
|
+
end
|
59
|
+
|
60
|
+
post[:ci_email] = options[:email].to_s unless options[:email].blank?
|
61
|
+
post[:ci_IP] = options[:ip].to_s unless options[:ip].blank?
|
62
|
+
end
|
63
|
+
|
64
|
+
def add_address(post, creditcard, options)
|
65
|
+
if address = options[:billing_address] || options[:address]
|
66
|
+
post[:ci_billaddr1] = address[:address1].to_s
|
67
|
+
post[:ci_billaddr2] = address[:address2].to_s unless address[:address2].blank?
|
68
|
+
post[:ci_billcity] = address[:city].to_s
|
69
|
+
post[:ci_billstate] = address[:state].to_s
|
70
|
+
post[:ci_billzip] = address[:zip].to_s
|
71
|
+
end
|
72
|
+
|
73
|
+
if shipping_address = options[:shipping_address] || options[:address]
|
74
|
+
post[:ci_shipaddr1] = shipping_address[:address1].to_s
|
75
|
+
post[:ci_shipaddr2] = shipping_address[:address2].to_s unless shipping_address[:address2].blank?
|
76
|
+
post[:ci_shipcity] = shipping_address[:city].to_s
|
77
|
+
post[:ci_shipstate] = shipping_address[:state].to_s
|
78
|
+
post[:ci_shipzip] = shipping_address[:zip].to_s
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def add_invoice(post, options)
|
83
|
+
memo = "OrderID: #{options[:order_id]}\nDescription: #{options[:description]}"
|
84
|
+
post[:ci_memo] = memo
|
85
|
+
end
|
86
|
+
|
87
|
+
def add_creditcard(post, creditcard)
|
88
|
+
post[:ccnum] = creditcard.number.to_s
|
89
|
+
post[:ccname] = creditcard.name.to_s
|
90
|
+
post[:cvv2] = creditcard.verification_value.to_s if creditcard.verification_value?
|
91
|
+
post[:expmon] = creditcard.month.to_s
|
92
|
+
post[:expyear] = creditcard.year.to_s
|
93
|
+
end
|
94
|
+
|
95
|
+
def parse(body)
|
96
|
+
h = {}
|
97
|
+
body.gsub!('<html><body><plaintext>', '')
|
98
|
+
body.
|
99
|
+
split("\r\n").
|
100
|
+
map do |i|
|
101
|
+
a = i.split('=')
|
102
|
+
h[a.first] = a.last unless a.first.nil?
|
103
|
+
end
|
104
|
+
h
|
105
|
+
end
|
106
|
+
|
107
|
+
def commit(action, money, parameters)
|
108
|
+
parameters[:acctid] = @options[:login].to_s
|
109
|
+
parameters[:subid] = @options[:sub_id].to_s unless @options[:sub_id].blank?
|
110
|
+
parameters[:amount] = amount(money)
|
111
|
+
|
112
|
+
case action
|
113
|
+
when :sale
|
114
|
+
parameters[:action] = 'ns_quicksale_cc'
|
115
|
+
when :authonly
|
116
|
+
parameters[:action] = 'ns_quicksale_cc'
|
117
|
+
parameters[:authonly] = 1
|
118
|
+
when :capture
|
119
|
+
parameters[:action] = 'ns_quicksale_cc'
|
120
|
+
end
|
121
|
+
|
122
|
+
response = parse(ssl_post(self.live_url, parameters.to_post_data) || '')
|
123
|
+
Response.new(successful?(response), message_from(response), response,
|
124
|
+
test: test?,
|
125
|
+
authorization: response['refcode'])
|
126
|
+
end
|
127
|
+
|
128
|
+
def successful?(response)
|
129
|
+
response['Status'] == 'Accepted'
|
130
|
+
end
|
131
|
+
|
132
|
+
def message_from(response)
|
133
|
+
if successful?(response)
|
134
|
+
'Accepted'
|
135
|
+
else
|
136
|
+
response['Reason'].split(':')[2].capitalize unless response['Reason'].nil?
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|