0

I'm testing recurring payment on Sandbox of Paypal. But I find out client's account is not enough money, but their own account is still recieved money.

If client 's account is not enough money, how does the paypal process? This transaction will be suspend or cancel...

If client'account have enough money then the transaction become activate.

user3541964
  • 107
  • 2
  • 13

1 Answers1

1

For initial payment, use FAILEDINITAMTACTION, Action you can specify when a payment fails. It is one of the following values:

ContinueOnFailure – By default, PayPal suspends the pending profile in the event that the initial payment amount fails. You can override this default behavior by setting this field to ContinueOnFailure. Then, if the initial payment amount fails, PayPal adds the failed payment amount to the outstanding balance for this recurring payment profile.

When you specify ContinueOnFailure, a success code is returned to you in the CreateRecurringPaymentsProfile response and the recurring payments profile is activated for scheduled billing immediately. You should check your IPN messages or PayPal account for updates of the payment status.

CancelOnFailure – If this field is not set or you set it to CancelOnFailure, PayPal creates the recurring payment profile, but places it into a pending status until the initial payment completes. If the initial payment clears, PayPal notifies you by IPN that the pending profile has been activated. If the payment fails, PayPal notifies you by IPN that the pending profile has been canceled.

Once you are into the regular billing cycle, Be sure to assign a value to MAXFAILEDPAYMENTS, which is the number of scheduled payments that can fail before the profile is automatically suspended. An IPN message is sent to the merchant when the specified number of failed payments is reached.

Then, AUTOBILLOUTAMT Indicates whether you would like PayPal to automatically bill the outstanding balance amount in the next billing cycle. The outstanding balance is the total amount of any previously failed scheduled payments that have yet to be successfully paid. It is one of the following values:

NoAutoBill – PayPal does not automatically bill the outstanding balance.

AddToNextBilling – PayPal automatically bills the outstanding balance.

it is up to you how to handle profiles that suspend.

Ind_KevinG
  • 1,945
  • 14
  • 9
  • Thank for your support. I would like to know how to set url for IPN. I find out "DoExpressCheckoutPayment" is set "PAYMENTREQUEST_n_NOTIFYURL". With "CreateRecurringPaymentsProfile", how set the url for IPN? – user3541964 May 24 '14 at 16:58
  • IPN is a whole different issue :) you should review documentation here: https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNImplementation/...fyi you will need to enable IPN in the account profile, where you can also set the IPN url so it would not be necessary to pass NOTIFYURL in the API call. – Ind_KevinG May 24 '14 at 17:54
  • Thanks, But I have diffrent kind of profile. I couldn't set default in the account. Do you have other way to help me? – user3541964 May 25 '14 at 14:32
  • you should review documentation here: https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNImplementation/ – Ind_KevinG May 25 '14 at 16:52