Last active
January 28, 2016 22:44
-
-
Save leofrozenyogurt/ad4f7db4a0e9aef47696 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c.http_post(c.url, | |
Curl::PostField.content('USER', "jb-us-asdasdad.paypal.com"), | |
Curl::PostField.content('PWD', "asdasasdad"), | |
Curl::PostField.content('SIGNATURE', "sig"), | |
Curl::PostField.content('METHOD', "SetExpressCheckout"), | |
Curl::PostField.content('VERSION', 95), | |
@cart_product_by_user.each do |product_hash| | |
Curl::PostField.content('PAYMENTREQUEST_0_ITEMAMT', product_hash.value ), #The amount authorized | |
Curl::PostField.content('PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID', product_hash.value) | |
end | |
Curl::PostField.content('PAYMENTREQUEST_0_PAYMENTACTION', "Sale"), #Sets up authorization for a single future payment | |
Curl::PostField.content('cancelUrl', "http://localhost:3000/dashboard"), #For use if the customer decides not to proceed with payment | |
Curl::PostField.content('returnUrl', "http://localhost:3000/dashboard") #For use if the customer proceeds with payment | |
) |
radar
commented
Jan 28, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment