concretecms-community-store / community_store_paypal_standard

Paypal Standard payments for Community Store for Concrete CMS
MIT License
6 stars 7 forks source link

IPN Callback suddenly failed, probably cert installation. Maybe switch to REST API? #17

Closed cahueya closed 1 year ago

cahueya commented 1 year ago

In some Store Instances that all run the latest version of CStore and the PayPal Standards Gateway, the IPN delivery started to fail one after the other. Not the same day, but within the same timeframe.

I did some investigation and it seems to be a certificate problem, I am currently working on that.

While doing the research I found, that the IPN method is deprecated and developers are asked to use the REST API (https://paypal.github.io/PayPal-PHP-SDK/) instead as the IPN method will be dropped somewhen in the future.

So if someone is up for that, it would likely be the future path.

Mesuva commented 1 year ago

The IPN method has always seemed flakey to me. Failures across the years for no reason.

I've reworked the checkout somewhat recently, meaning it's now easier to implement things like Paypal's 'checkout' scripts, and do a proper upgrade for Stripe elements.

I've started on the Paypal one, which I think could then end up being a replacement for Paypal Standard. But I may also be able to swap out the callback handling at the same time, since it'll likely be the same code.

cahueya commented 1 year ago

Do you have an estimation for that? I'm ripping my hair dealing with the IPN/cert stuff. It works well and goes through when the IPN is triggered manually from the history but will do nothing when called programmatically as it should. So I'm torn between either debugging this occult behavior or focus on building something better. I don"t like to put much energy in something which will be useless in the forseeable future. Thank you!

Mesuva commented 1 year ago

No solid estimation I'm afraid, it's just something I've been working on between projects. It was just something I had pencilled in for the next few weeks.

cahueya commented 1 year ago

So you're not talking about a Payment Gateway but some completely new checkout process that handles integration more easy? I'm currently thinking about implementing the REST API into a new iteration of the Paypal Standards Gateway, which seems to be just about handling the validation Class differently. I'm actually in a hurry because ALL my clients on that server don't receive IPNs for now.

Mesuva commented 1 year ago

Not a completely new checkout, just a reworking of how/when the payment gateways get loaded in (they get loaded in the step, rather than on the page load). It won't impact existing gateways or the checkout page overall, it's really just a javascript change. And there's no difference to the way callbacks are coded up. (it's a bit off topic, but I've done this also as part of better handling order attributes)

I'd love to be able to jump in and help here, I'm just under some time pressures this week myself.

I'd suggest looking at updating the existing Paypal Standards payment method with the REST API at this point, as you've suggested. I'll help with whatever time I do have, just message if you need someone to bounce something off of.

cahueya commented 1 year ago

I finally solved the issue by changing which TLS ciphers are used in the webserver config. PayPal just changed what they accepted without giving notice. So for whoever runs into a similar issue - look that direction. For now, that Issue is closed but I believe implementing the REST API approach is the way to go.

Mesuva commented 1 year ago

Great to hear you've solved this. I had a feeling it was something to do with with something server related, but I totally agree that updating things so it uses REST is appropriate.