vaulted_billing 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
@@ -94,6 +94,22 @@ module VaultedBilling
|
|
94
94
|
respond_with(credit_card, result, :success => result.success?)
|
95
95
|
end
|
96
96
|
|
97
|
+
def purchase(customer, credit_card, amount)
|
98
|
+
customer = customer.to_vaulted_billing
|
99
|
+
credit_card = credit_card.to_vaulted_billing
|
100
|
+
result = post_data(build_request('createCustomerProfileTransactionRequest') { |xml|
|
101
|
+
xml.transaction do
|
102
|
+
xml.profileTransAuthCapture do
|
103
|
+
xml.amount amount
|
104
|
+
xml.customerProfileId customer.vault_id
|
105
|
+
xml.customerPaymentProfileId credit_card.vault_id
|
106
|
+
end
|
107
|
+
end
|
108
|
+
xml.extraOptions 'x_duplicate_window=0'
|
109
|
+
})
|
110
|
+
respond_with(new_transaction_from_response(result.body), result, :success => result.success?)
|
111
|
+
end
|
112
|
+
|
97
113
|
def authorize(customer, credit_card, amount)
|
98
114
|
customer = customer.to_vaulted_billing
|
99
115
|
credit_card = credit_card.to_vaulted_billing
|
@@ -72,6 +72,16 @@ module VaultedBilling
|
|
72
72
|
respond_with(credit_card, response, :success => response.success?)
|
73
73
|
end
|
74
74
|
|
75
|
+
def purchase(customer, credit_card, amount)
|
76
|
+
response = post_data(transaction_data('sale', {
|
77
|
+
:customer_vault_id => credit_card.to_vaulted_billing.vault_id,
|
78
|
+
:amount => amount
|
79
|
+
}))
|
80
|
+
respond_with(new_transaction_from_response(response.body),
|
81
|
+
response,
|
82
|
+
:success => response.success?)
|
83
|
+
end
|
84
|
+
|
75
85
|
def authorize(customer, credit_card, amount)
|
76
86
|
response = post_data(transaction_data('auth', {
|
77
87
|
:customer_vault_id => credit_card.to_vaulted_billing.vault_id,
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vaulted_billing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 11
|
10
|
+
version: 0.0.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nathaniel Bibler
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-17 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|