PayPal_Pro plugin - Reattempt on Failure

Discussion in 'Payments processing' started by adrianogaleno, Nov 21, 2010.

  1. adrianogaleno

    adrianogaleno Member

    Joined:
    Jun 26, 2007
    Messages:
    34
    We have recently contacted PayPal support about why a certain subscription which failed to renew due to a problem in the funding source did not cause PayPal to send us a cancel IPN. Tech support said the reason was that we did not have a maximum limit on retry attempts. However we have set the "Reattempt on Failure" to 3,6,8 (I don't see this information anywhere on the user payment log).
    They(PayPal support) also made the following note:
    "
    The MAXFAILEDPAYMENTS field in the Profile Subscription ID XXXXX is set to indefinite and this is the number of failed payments allowed before the profile is automatically suspended.
    In the future please set the "Failed payments allowed" to the desired value.
    "

    Could you please comment/clarify this issue?

    Thank you.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You can set this in /amember/plugins/payment/paypal_pro/paypal_pro.inc.php:
    PHP:
        function createRecurringBillingProfiles($payment_id$token=""$cc_info="",$ec_details=""){
            global 
    $db;
            
    $payment $db->get_payment($payment_id);
             list(
    $amount$title$products$u$invoicex) =
                    
    $this->get_payment_params($payment_id);
            
    $terms $this->getBillingTerms($payment_id$products);

            
    usort($terms"recurring_first");

            foreach(
    $terms as $t){
                if(!
    $t['recurring']) continue;

                 
    $vars = array( 'METHOD'            =>  'CreateRecurringPaymentsProfile',

    add one line:
    PHP:
        function createRecurringBillingProfiles($payment_id$token=""$cc_info="",$ec_details=""){
            global 
    $db;
            
    $payment $db->get_payment($payment_id);
             list(
    $amount$title$products$u$invoicex) =
                    
    $this->get_payment_params($payment_id);
            
    $terms $this->getBillingTerms($payment_id$products);

            
    usort($terms"recurring_first");

            foreach(
    $terms as $t){
                if(!
    $t['recurring']) continue;

                 
    $vars = array( 'METHOD'            =>  'CreateRecurringPaymentsProfile',
                                      
    'MAXFAILEDPAYMENTS' => '2',

Share This Page