activemerchant 1.56.0 → 1.57.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +42 -0
- data/lib/active_merchant/billing/gateways/authorize_net.rb +52 -21
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +1 -0
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +243 -0
- data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +11 -11
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +37 -8
- data/lib/active_merchant/billing/gateways/card_stream.rb +36 -11
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +3 -0
- data/lib/active_merchant/billing/gateways/clearhaus.rb +2 -2
- data/lib/active_merchant/billing/gateways/creditcall.rb +1 -1
- data/lib/active_merchant/billing/gateways/cyber_source.rb +12 -1
- data/lib/active_merchant/billing/gateways/element.rb +335 -0
- data/lib/active_merchant/billing/gateways/forte.rb +8 -0
- data/lib/active_merchant/billing/gateways/in_context_paypal_express.rb +15 -0
- data/lib/active_merchant/billing/gateways/litle.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +2 -1
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +165 -0
- data/lib/active_merchant/billing/gateways/payeezy.rb +54 -12
- data/lib/active_merchant/billing/gateways/sage.rb +379 -128
- data/lib/active_merchant/billing/gateways/stripe.rb +13 -3
- data/lib/active_merchant/billing/gateways/trans_first.rb +26 -6
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +573 -0
- data/lib/active_merchant/billing/gateways/worldpay.rb +7 -0
- data/lib/active_merchant/billing/network_tokenization_credit_card.rb +11 -0
- data/lib/active_merchant/version.rb +1 -1
- metadata +7 -6
- data/lib/active_merchant/billing/gateways/sage/sage_bankcard.rb +0 -89
- data/lib/active_merchant/billing/gateways/sage/sage_core.rb +0 -115
- data/lib/active_merchant/billing/gateways/sage/sage_vault.rb +0 -149
- data/lib/active_merchant/billing/gateways/sage/sage_virtual_check.rb +0 -97
@@ -1,97 +0,0 @@
|
|
1
|
-
require 'active_merchant/billing/gateways/sage/sage_core'
|
2
|
-
|
3
|
-
module ActiveMerchant #:nodoc:
|
4
|
-
module Billing #:nodoc:
|
5
|
-
class SageVirtualCheckGateway < Gateway #:nodoc:
|
6
|
-
include SageCore
|
7
|
-
self.live_url = 'https://www.sagepayments.net/cgi-bin/eftVirtualCheck.dll?transaction'
|
8
|
-
self.source = 'virtual_check'
|
9
|
-
|
10
|
-
def purchase(money, credit_card, options = {})
|
11
|
-
post = {}
|
12
|
-
add_check(post, credit_card)
|
13
|
-
add_check_customer_data(post, options)
|
14
|
-
add_transaction_data(post, money, options)
|
15
|
-
commit(:purchase, post)
|
16
|
-
end
|
17
|
-
|
18
|
-
def void(reference, options = {})
|
19
|
-
post = {}
|
20
|
-
add_reference(post, reference)
|
21
|
-
commit(:void, post)
|
22
|
-
end
|
23
|
-
|
24
|
-
def credit(money, credit_card, options = {})
|
25
|
-
post = {}
|
26
|
-
add_check(post, credit_card)
|
27
|
-
add_check_customer_data(post, options)
|
28
|
-
add_transaction_data(post, money, options)
|
29
|
-
commit(:credit, post)
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
def add_check(post, check)
|
34
|
-
post[:C_first_name] = check.first_name
|
35
|
-
post[:C_last_name] = check.last_name
|
36
|
-
post[:C_rte] = check.routing_number
|
37
|
-
post[:C_acct] = check.account_number
|
38
|
-
post[:C_check_number] = check.number
|
39
|
-
post[:C_acct_type] = account_type(check)
|
40
|
-
end
|
41
|
-
|
42
|
-
def add_check_customer_data(post, options)
|
43
|
-
# Required Customer Type – (NACHA Transaction Class)
|
44
|
-
# CCD for Commercial, Merchant Initiated
|
45
|
-
# PPD for Personal, Merchant Initiated
|
46
|
-
# WEB for Internet, Consumer Initiated
|
47
|
-
# RCK for Returned Checks
|
48
|
-
# ARC for Account Receivable Entry
|
49
|
-
# TEL for TelephoneInitiated
|
50
|
-
post[:C_customer_type] = "WEB"
|
51
|
-
|
52
|
-
# Optional 10 Digit Originator ID – Assigned By for each transaction class or business purpose. If not provided, the default Originator ID for the specific Customer Type will be applied.
|
53
|
-
post[:C_originator_id] = options[:originator_id]
|
54
|
-
|
55
|
-
# Optional Transaction Addenda
|
56
|
-
post[:T_addenda] = options[:addenda]
|
57
|
-
|
58
|
-
# Required Check Writer Social Security Number ( Numbers Only, No Dashes )
|
59
|
-
post[:C_ssn] = options[:ssn].to_s.gsub(/[^\d]/, '')
|
60
|
-
|
61
|
-
post[:C_dl_state_code] = options[:drivers_license_state]
|
62
|
-
post[:C_dl_number] = options[:drivers_license_number]
|
63
|
-
post[:C_dob] = format_birth_date(options[:date_of_birth])
|
64
|
-
end
|
65
|
-
|
66
|
-
def format_birth_date(date)
|
67
|
-
date.respond_to?(:strftime) ? date.strftime("%m/%d/%Y") : date
|
68
|
-
end
|
69
|
-
|
70
|
-
# DDA for Checking
|
71
|
-
# SAV for Savings
|
72
|
-
def account_type(check)
|
73
|
-
case check.account_type
|
74
|
-
when 'checking' then 'DDA'
|
75
|
-
when 'savings' then 'SAV'
|
76
|
-
else raise ArgumentError, "Unknown account type #{check.account_type}"
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
def parse(data)
|
81
|
-
response = {}
|
82
|
-
response[:success] = data[1,1]
|
83
|
-
response[:code] = data[2,6].strip
|
84
|
-
response[:message] = data[8,32].strip
|
85
|
-
response[:risk] = data[40, 2]
|
86
|
-
response[:reference] = data[42, 10]
|
87
|
-
|
88
|
-
extra_data = data[53...-1].split("\034")
|
89
|
-
response[:order_number] = extra_data[0]
|
90
|
-
response[:authentication_indicator] = extra_data[1]
|
91
|
-
response[:authentication_disclosure] = extra_data[2]
|
92
|
-
response
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|