Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't get PayPal checkout errors when insufficient funds
    primarykey
    data
    text
    <p>Can't get my head around PayPal payment response errors or at least warnings. I am Australian developer (at least I am located in Australia and using AUD as a currency).</p> <p>Could you please tell me why if the sandbox user has insufficient funds the transaction has a positive (valid) response on the request for payment?</p> <p>So I have user_A who is <strong>buyer</strong> and a seller_user. user_A has 0AUD and makes a transaction of 20AUD of recurring payments and the response is successful??? Why?</p> <p>What is the way to get to know that user doesn't have sufficient funds for the transaction?</p> <pre><code> gem: paypal-recurring rails: 3.2.14 location: Australia </code></pre> <p>====== Controller action for redirecting to checkout url</p> <pre><code>ppl = PayPal::Recurring.new( return_url: paypal_confirm_url(:plan_id =&gt; params[:plan_id], :user_id =&gt; current_user.id), cancel_url: paypal_no_checkout_url, description: "Starter", amount: 15, currency: "AUD" ) response = ppl.checkout if response.valid? redirect_to response.checkout_url else redirect_to :back end </code></pre> <p>==== Controller action after confirmation</p> <pre><code>ppr = PayPal::Recurring.new( token: params[:token], payer_id: params[:PayerID], description: plan.name, amount: plan.value, currency: "AUD", period: :monthly, start_at: Time.zone.now, frequency: 1 ) response = ppr.request_payment if response.errors.any? flash.keep[:error] = "Something went wrong please contact paypal or ask our development team: team.grapple1@gmail.com" return false end response = ppr.create_recurring_profile paypal_recurring_profile_token = response.profile_id # response.profile_id = nil???? save! </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload