How can I test Paypal Express with ActiveMerchant in a Rails 3.2 app with rspec/capybara integration test?
You can test by setting:
ActiveMerchant::Billing::Base.mode = :test
PayPal however will require you to enter complete billing information or the API won't even accept it and will return:
Error: There's an error with this transaction. Please enter a complete billing address.
In which case you can supply it with some generic info:
:billing_address => {
:name => "Test Person",
:address1 => "123 W 423 E",
:city => "Somewhere",
:state => "CA",
:country => "US",
:zip => "88888"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With