givewp-snippet-library icon indicating copy to clipboard operation
givewp-snippet-library copied to clipboard

Add a snippet for custom web-hook?

Open JPaulMora opened this issue 3 years ago • 5 comments

User Story

As a developer creating my own payment processor add-on, I want sample code to validate a donation so that said paid donation can be updated in my website.

Details

I'm looking to get a very simple example of how to update an existing, pending donation to set it as paid.

Additional Context

Both PayPal and Stripe hooks are a bit complicated and not exactly explicit to use as examples.

Acceptance Criteria

  • [ ] Create sample hook.

JPaulMora avatar Nov 22 '21 18:11 JPaulMora

@JPaulMora Hi! We're actually in the process of building an entirely new Gateway API for 3rd party developers such as yourself. Depending on the urgency of what you're building, you may consider waiting for the new API as it is considerably simpler to build gateways with. It will be available within a month.

Question on your gateway: Does it process transactions on-site (like Stripe where the donor never leaves the website) or off-site (like PayPal where the user gets sent elsewhere to provide payment information)?

JasonTheAdams avatar Nov 22 '21 18:11 JasonTheAdams

Thanks for the quick response Jason! It's off-site. My payment processor redirects the user with some URL params i'm already capturing, just don't know exactly how to pass them to GiveWP.

Due to the nature of the project, which is starting in February/22 we can't delay this too long. If required later we'd update our plugin with the new API.

JPaulMora avatar Nov 22 '21 18:11 JPaulMora

Hi @JPaulMora!

Hmm. We're really, really close with this. Would you be open to receiving a beta, some documentation, and trying out the new API? There's a couple reasons I'm inclined to do this:

  • The new API requires far less code to write new gateways. It handles so much, limiting the gateway to only need to know how to fulfill things specific to the gateway (i.e. API calls, redirects, etc.)
  • We're gearing up to start work on GiveWP 3.0 in 2022 and there will be some major overhauls. The new Gateway API will be supported in the new version. The old system won't work anymore, so you'll have to use this new API soon(ish) anyway.
  • We'd love to get some feedback on it. We've updated one of our own gateways and are in the process of updating another (offsite) one now.

If I got you a beta in the next week or two, would you be interested in that?

JasonTheAdams avatar Nov 23 '21 16:11 JasonTheAdams

Hi, I'm definitely interested! Would be glad to share some feedback from a user & developer perspective. You can add me on telegram under the same username to have faster communication. Will I be able to use this in production?

JPaulMora avatar Nov 23 '21 20:11 JPaulMora

Great! Would you please email me at [email protected] and we'll coordinate. And yes, I strongly advise you to thoroughly test it on staging before production, but it should be stable. If we find any issues, since you're testing for us, we'll be quick with fixes.

Thanks for your willingness to test this out!

JasonTheAdams avatar Nov 23 '21 20:11 JasonTheAdams