An invalid merchant configuration in Paypal with rails
I am making the paypal application with rails. I have create all the necessary a/c in http://develpers.paypal.com and also have insert all that information in my rails app. My problem is when i am trying to authorize my seller a/c, it gives me error like "Failure: This transaction cannot be processed due to an invalid merchant configuration."
My code is:
# all inforation is of seller API id, password, signature
gateway = ActiveMerchant::Billing::PaypalGateway.new(
:login => "seller_1302505219_biz_api1.gmail.com",
:password => "...",
:signature => "..."
)
options = {
:ip => request.remote_ip,
:billing_address => {
:name => "Name",
:address1 => '1 Main St',
:address2 => '',
:city => 'San Jose',
开发者_StackOverflow社区:state => 'CA',
:country => 'US',
:zip => '95131',
# :phone => '408-983-5678'
:phone => '408-678-0945'
}
}
res = gateway.authorize(amount, credit_card, options)
You need to have a seller account set up with Website Payments Pro.
- Create your selling test account using the Preconfigured option.
- Under Account Type, select Website Payments Pro.
Good luck!
Got the solution. I have google it but got the information about the "Billing agreement". But that functionality is provided in Website Payment Pro. so I have just create an test account using WPP and use that WPP account credential for transaction. It works fine.
Cheers!!!
In addition, your account may or may not be enabled for Pro (DoDirectPayment) even after signing up for it in Sandbox. There's a thread on the x.com forums where you can ask one of the support guys to enable it for you.
精彩评论