19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/payxml.rb', line 19
def purchase(options = {})
authtx = Auth::Request.new(@paygate_id, @paygate_password)
authtx.customer_reference = options[:customer_reference]
authtx.customer_name = options[:customer_name]
authtx.credit_card_number = options[:credit_card_number]
authtx.expiry_date = options[:expiry_date]
authtx.currency = options[:currency]
authtx.amount = options[:amount]
authtx.cvv = options[:cvv]
authtx.customer_ip_address = options[:customer_ip_address]
authtx.notify_callback_url = options[:notify_callback_url]
authtx.response_url = options[:response_url]
response = post_request_body(authtx.xml_string)
response_object = Auth::Response.allocate
response_object.parse(response.body)
response_object
end
|