Buy Now
Sign in

IPN Listener only check payment_status "completed" and "expired"

PF , April 03 2019, 13:21
P
PF 4
April 03 2019, 13:21 #385467
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
GreyHead 64
April 03 2019, 15:03 #385470
Hi PF,
As I read the action code it checks for the string VERIFIED in the return data and if found returns Valid, otherwise returns Invalid.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
P
PF 4
April 03 2019, 16:25 #385474
OK. you are right. I wanted to do so...
I understand that I cannot consider" invalid" any payment status other than "completed". But IPN Listener only recognizes "completed" as Valid and "expired" as Invalid.
how to manage other payment_status?
many thanks
PF
healyhatman 7
April 03 2019, 22:55 #385484
Any reason you can't just build your new form in CFv6?
Web developer at SkySpider.com.au
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
P
PF 4
April 04 2019, 07:43 #385510
No reason...
I read CFv6 manual and FAQ, no news about IPN Listener, but some work to do for migration from v5 to v6.
do you think that CFv6 will solve my problem?
GreyHead 64
April 04 2019, 09:10 #385513
Hi PF,
As I said, the IPN Listener recognises any response except 'Completed' as invalid. If you want to handle the invalid responses separately then you can use PHP in the On Fail event of the Listener action.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
P
PF 4
April 04 2019, 11:00 #385526
you are right.
I deleted the custom code and IPN Listener only recognizes "completed" ad "Valid.
but all the other payment_status exit from IPN Listener without activating the "invalid" or "error" event.
maybe the problem is on PayPal IPN simulator?
many thanks
PF
admin 27
April 07 2019, 22:03 #385726
Hi PF,
The CF6 PayPal IPN action should handle all the responses, you can install CF6 with 5 on the same site, build your form on v6 and try it!
Best regards
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!