I am testing in Chronoforms5 a form with PayPal payment.
using Paypal IPN Listener I found that that application only consider payment_status="Completed" as "Verified" and payment_status="expired" as "Invalid".
I don't know when Paypal sends other payment_status, but there are a lot:
canceled_reversal, declined, failed, in-progress, partial_refunded, pending, processed, refunded, reversed, voided.
I want to manage all exit condition so I put a "Custom code" on IPN before "PayPal Listener":
<?php
if ( $_POST["payment_status"] == 'Completed' ) {}
else
{$_POST["payment_status"] = 'expired';}
?>
Using this code every payment_status not equal to "Completed" is changed with "expired" and PayPal Listener manage it with "On Invalid" event.
It seems to work in sandbox.
Before I start test in production, any suggestion?
maybe this simplification could be dangerous
Many thanks
PF
using Paypal IPN Listener I found that that application only consider payment_status="Completed" as "Verified" and payment_status="expired" as "Invalid".
I don't know when Paypal sends other payment_status, but there are a lot:
canceled_reversal, declined, failed, in-progress, partial_refunded, pending, processed, refunded, reversed, voided.
I want to manage all exit condition so I put a "Custom code" on IPN before "PayPal Listener":
<?php
if ( $_POST["payment_status"] == 'Completed' ) {}
else
{$_POST["payment_status"] = 'expired';}
?>
Using this code every payment_status not equal to "Completed" is changed with "expired" and PayPal Listener manage it with "On Invalid" event.
It seems to work in sandbox.
Before I start test in production, any suggestion?
maybe this simplification could be dangerous
Many thanks
PF