• Resolved clautrade

    (@clautrade)


    Hello,

    Due security reasons Paypal lock some recurring payments (about 21 days) to be sure that the seller have enough funds in case of complaints.
    In fact the locked payments are confirmed (The money is already owned by the seller) but Paypal send IPN with payment_status=Pending.

    The issue is that the recurring payments are not processed, the webpage receive IPN but the hook ‘pmpro_subscription_payment_completed’ not work. Normally work with IPN and payment_status=Completed.

    I see that in the file ipnhandler.php the code only process payment_status=Completed

    //PayPal Express Recurring Payments
    if ( $txn_type == "recurring_payment" ) {
    	$last_subscription_order = new MemberOrder();
    	if ( $last_subscription_order->getLastMemberOrderBySubscriptionTransactionID( $subscr_id ) ) {
    		//subscription payment, completed or failure?
    		if ( $_POST['payment_status'] == "Completed" ) {
    			pmpro_ipnSaveOrder( $txn_id, $last_subscription_order );
    		} elseif ( $_POST['payment_status'] == "Failed" ) {
    			pmpro_ipnFailedPayment( $last_subscription_order );
    		} else {
    			ipnlog( 'Payment status is ' . $_POST['payment_status'] . '.' );
    		}
    	} else {
    		ipnlog( "ERROR: Couldn't find last order for this recurring payment (" . $subscr_id . ")." );
    	}
    		
    	pmpro_ipnExit();
    }

    Could you tell me something about and if PmPro can process payment_status=Pending for recurring payments?

    Many thanks!

    • This topic was modified 4 years, 10 months ago by clautrade.
    • This topic was modified 4 years, 10 months ago by clautrade.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi @clautrade

    Thank you for reaching out.

    Our IPN Handler does not support “Pending” as a payment status. We don’t normally recommend this but you would need to adjust the IPNHandler PHP file directly to support this.

    I have added this to our development schedule to add in a hook for custom payment statuses so developer’s can manipulate or run their own code.

    Thank you for understanding.

    Thread Starter clautrade

    (@clautrade)

    Hi Andrew,

    many thanks for fast reply … ok, I’ll try to process it by other way.

    Maybe do you or someone know if there is a way to set it (set IPN parameters) in Paypal account?

    Thanks! 🙂

    • This reply was modified 4 years, 10 months ago by clautrade.
    Plugin Author Andrew Lima

    (@andrewza)

    PayPal controls the IPN parameters sent, you may reach out to PayPal support for a path forward.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘payment_status=Pending is not processed’ is closed to new replies.