# File lib/active_merchant/billing/integrations/two_checkout/notification.rb, line 94 94: def acknowledge 95: return false if security_key.blank? 96: 97: Digest::MD5.hexdigest("#{secret}#{params['sid']}#{transaction_id}#{gross}").upcase == security_key.upcase 98: end
# File lib/active_merchant/billing/integrations/two_checkout/notification.rb, line 40 40: def complete? 41: status == 'Completed' 42: end
order_number 2Checkout.com order number
card_holder_name Card holder's name street_address Card holder's address city Card holder's city state Card holder's state zip Card holder's zip country Card holder's country email Card holder's email phone Card holder's phone credit_card_processed Y if successful, K if waiting for approval total Total purchase amount ship_name Shipping information ship_street_address Shipping information ship_city Shipping information ship_state Shipping information ship_zip Shipping information ship_country Shipping information product_id 2Checkout product ID for purchased items will append a number if more than one item.
ex. product_id,product_id1,product_id2
quantity quantity of corresponding product will append a number if more than one item.
ex. quantity,quantity1,quantity2
merchant_product_id your product ID for purchased items will append a number if more than one item.
ex. merchant_product_id,merchant_product_id1,merchant_product_id2
product_description your description for purchased items will append a number if more than one item.
ex. product_description,product_description1,product_description2
# File lib/active_merchant/billing/integrations/two_checkout/notification.rb, line 36 36: def currency 37: 'USD' 38: end
the money amount we received in X.2 decimal.
# File lib/active_merchant/billing/integrations/two_checkout/notification.rb, line 70 70: def gross 71: params['total'] 72: end
# File lib/active_merchant/billing/integrations/two_checkout/notification.rb, line 44 44: def item_id 45: params['cart_order_id'] 46: end
# File lib/active_merchant/billing/integrations/two_checkout/notification.rb, line 56 56: def payer_email 57: params['email'] 58: end
# File lib/active_merchant/billing/integrations/two_checkout/notification.rb, line 52 52: def received_at 53: params[''] 54: end
# File lib/active_merchant/billing/integrations/two_checkout/notification.rb, line 60 60: def receiver_email 61: params[''] 62: end
# File lib/active_merchant/billing/integrations/two_checkout/notification.rb, line 90 90: def secret 91: @options[:credential2] 92: end
The MD5 Hash
# File lib/active_merchant/billing/integrations/two_checkout/notification.rb, line 65 65: def security_key 66: params['key'] 67: end
# File lib/active_merchant/billing/integrations/two_checkout/notification.rb, line 79 79: def status 80: case params['credit_card_processed'] 81: when 'Y' 82: 'Completed' 83: when 'K' 84: 'Pending' 85: else 86: 'Failed' 87: end 88: end
# File lib/active_merchant/billing/integrations/two_checkout/notification.rb, line 102 102: def parse(post) 103: @raw = post.to_s 104: for line in @raw.split('&') 105: key, value = *line.scan( %{^(\w+)\=(.*)$} ).flatten 106: params[key] = CGI.unescape(value || '') 107: end 108: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.