I am a little bit confused, somehow I am able to change the amount of the purchase:

First I setup my purchase,

@setup_response = gateway.setup_purchase(
  10*100,
  :ip                => request.remote_ip,
  :return_url        => url_for(:controller => "payments", :action => 'confirm', :only_path => false),
  :cancel_return_url => url_for(:controller => "payments", :action => 'error', :only_path => false),
  :currency => 'EUR',
  :email => current_user.email,
  :no_shipping => true,
  :items => items
)

Later I do the purchase:

  purchase = gateway.purchase(
      500*100,
      :ip       => request.remote_ip,
      :payer_id => params[:payer_id],
      :token    => params[:token],
      :currency => 'EUR'
      )

As you can see I have changed the amount from 10 -> setup/user agreed to 1000 when purchasing and it did work in the Paypal Sandbox.

I think this is really strange. Can anybody confirm this? This should not happen? Is this perhaps only possible in the Sandbox?

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top