I'm trying to set up a rails app to use Paypal website payments standard. I'd rather have users click a button and submit their info on the Paypal site rather than on my site, but I'd like to use ActiveMerchant for it's test mode and handling of credentials.
All the info I can find on the net describes how to use ActiveMerchant to let users fill in details in a form in your site and use the Paypal API to charge their card. Ryan bates has screen casts where he walks through using the website payments standard method but he doesn't take advantage of ActiveMerchant in his method.
I think I have ActiveMerchant set up in my app correctly:
# config/environments/development.rb
config.after_initialize do
ActiveMerchant::Billing::Base.mode = :test
::GATEWAY = ActiveMerchant::Billing::PaypalGateway.new(
login: 'dgesf_1313616880_biz_api1.gmail.com',
password: '1313616919',
signature: 'AKXgGVsxct8DAOfYpyE73guXzPo1ACa185mHcgzMcYOCJsNYSJ0NflAF'
)
end
But how do I generate a form which will use the information above to POST my details (item price, name etc) to the correct Paypal URL so that they can construct the page which will display item details to the user and allow him to enter his payment information?
Can I use ActiveMerchant to fake Paypal IPN notifications and test my apps handling of them?