Class: ActiveMerchant::Billing::CredoraxGateway
- Defined in:
- lib/active_merchant/billing/gateways/credorax.rb
Constant Summary collapse
- RESPONSE_MESSAGES =
{ "00" => "Approved or completed successfully", "01" => "Refer to card issuer", "02" => "Refer to card issuer special condition", "03" => "Invalid merchant", "04" => "Pick up card", "05" => "Do not Honour", "06" => "Invalid Transaction for Terminal", "07" => "Pick up card special condition", "08" => "Time-Out", "09" => "No Original", "10" => "Approved for partial amount", "11" => "Partial Approval", "12" => "Invalid transaction card / issuer / acquirer", "13" => "Invalid amount", "14" => "Invalid card number", "17" => "Invalid Capture date (terminal business date)", "19" => "System Error; Re-enter transaction", "20" => "No From Account", "21" => "No To Account", "22" => "No Checking Account", "23" => "No Saving Account", "24" => "No Credit Account", "30" => "Format error", "34" => "Implausible card data", "39" => "Transaction Not Allowed", "41" => "Lost Card, Pickup", "42" => "Special Pickup", "43" => "Hot Card, Pickup (if possible)", "44" => "Pickup Card", "51" => "Not sufficient funds", "52" => "No checking Account", "53" => "No savings account", "54" => "Expired card", "55" => "Pin incorrect", "57" => "Transaction not allowed for cardholder", "58" => "Transaction not allowed for merchant", "59" => "Suspected Fraud", "61" => "Exceeds withdrawal amount limit", "62" => "Restricted card", "63" => "MAC Key Error", "65" => "Activity count limit exceeded", "66" => "Exceeds Acquirer Limit", "67" => "Retain Card; no reason specified", "68" => "Response received too late", "75" => "Pin tries exceeded", "76" => "Invalid Account", "77" => "Issuer Does Not Participate In The Service", "78" => "Function Not Available", "79" => "Key Validation Error", "80" => "Approval for Purchase Amount Only", "81" => "Unable to Verify PIN", "82" => "Time out at issuer system", "83" => "Not declined (Valid for all zero amount transactions)", "84" => "Invalid Life Cycle of transaction", "85" => "Not declined", "86" => "Cannot verify pin", "87" => "Purchase amount only, no cashback allowed", "88" => "MAC sync Error", "89" => "Security Violation", "91" => "Issuer not available", "92" => "Unable to route at acquirer Module", "93" => "Transaction cannot be completed", "94" => "Duplicate transaction", "95" => "Contact Acquirer", "96" => "System malfunction", "97" => "No Funds Transfer", "98" => "Duplicate Reversal", "99" => "Duplicate Transaction", "N3" => "Cash Service Not Available", "N4" => "Cash Back Request Exceeds Issuer Limit", "N7" => "N7 (visa), Decline CVV2 failure", "R0" => "Stop Payment Order", "R1" => "Revocation of Authorisation Order", "R3" => "Revocation of all Authorisations Order" }
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::DEBIT_CARDS, Gateway::RECURRING_DEPRECATION_MESSAGE, Gateway::STANDARD_ERROR_CODE
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(amount, payment_method, options = {}) ⇒ Object
- #capture(amount, authorization, options = {}) ⇒ Object
- #credit(amount, payment_method, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ CredoraxGateway
constructor
A new instance of CredoraxGateway.
- #purchase(amount, payment_method, options = {}) ⇒ Object
- #refund(amount, authorization, options = {}) ⇒ Object
- #scrub(transcript) ⇒ Object
- #supports_scrubbing? ⇒ Boolean
- #verify(credit_card, options = {}) ⇒ Object
- #void(authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, #generate_unique_id, inherited, supported_countries, #supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #test?
Methods included from CreditCardFormatting
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ CredoraxGateway
Returns a new instance of CredoraxGateway.
100 101 102 103 |
# File 'lib/active_merchant/billing/gateways/credorax.rb', line 100 def initialize(={}) requires!(, :merchant_id, :cipher_key) super end |
Instance Method Details
#authorize(amount, payment_method, options = {}) ⇒ Object
116 117 118 119 120 121 122 123 124 125 |
# File 'lib/active_merchant/billing/gateways/credorax.rb', line 116 def (amount, payment_method, ={}) post = {} add_invoice(post, amount, ) add_payment_method(post, payment_method) add_customer_data(post, ) add_email(post, ) add_echo(post, ) commit(:authorize, post) end |
#capture(amount, authorization, options = {}) ⇒ Object
127 128 129 130 131 132 133 134 135 |
# File 'lib/active_merchant/billing/gateways/credorax.rb', line 127 def capture(amount, , ={}) post = {} add_invoice(post, amount, ) add_reference(post, ) add_customer_data(post, ) add_echo(post, ) commit(:capture, post) end |
#credit(amount, payment_method, options = {}) ⇒ Object
157 158 159 160 161 162 163 164 165 166 |
# File 'lib/active_merchant/billing/gateways/credorax.rb', line 157 def credit(amount, payment_method, ={}) post = {} add_invoice(post, amount, ) add_payment_method(post, payment_method) add_customer_data(post, ) add_email(post, ) add_echo(post, ) commit(:credit, post) end |
#purchase(amount, payment_method, options = {}) ⇒ Object
105 106 107 108 109 110 111 112 113 114 |
# File 'lib/active_merchant/billing/gateways/credorax.rb', line 105 def purchase(amount, payment_method, ={}) post = {} add_invoice(post, amount, ) add_payment_method(post, payment_method) add_customer_data(post, ) add_email(post, ) add_echo(post, ) commit(:purchase, post) end |
#refund(amount, authorization, options = {}) ⇒ Object
147 148 149 150 151 152 153 154 155 |
# File 'lib/active_merchant/billing/gateways/credorax.rb', line 147 def refund(amount, , ={}) post = {} add_invoice(post, amount, ) add_reference(post, ) add_customer_data(post, ) add_echo(post, ) commit(:refund, post) end |
#scrub(transcript) ⇒ Object
179 180 181 182 183 |
# File 'lib/active_merchant/billing/gateways/credorax.rb', line 179 def scrub(transcript) transcript. gsub(%r((b1=)\d+), '\1[FILTERED]'). gsub(%r((b5=)\d+), '\1[FILTERED]') end |
#supports_scrubbing? ⇒ Boolean
175 176 177 |
# File 'lib/active_merchant/billing/gateways/credorax.rb', line 175 def supports_scrubbing? true end |
#verify(credit_card, options = {}) ⇒ Object
168 169 170 171 172 173 |
# File 'lib/active_merchant/billing/gateways/credorax.rb', line 168 def verify(credit_card, ={}) MultiResponse.run(:use_first_response) do |r| r.process { (100, credit_card, ) } r.process(:ignore_result) { void(r., ) } end end |
#void(authorization, options = {}) ⇒ Object
137 138 139 140 141 142 143 144 145 |
# File 'lib/active_merchant/billing/gateways/credorax.rb', line 137 def void(, ={}) post = {} add_customer_data(post, ) reference_action = add_reference(post, ) add_echo(post, ) post[:a1] = generate_unique_id commit(:void, post, reference_action) end |