Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Content handlers
#11
(02-20-2019, 09:28 PM)lfeliz Wrote: I have decided to implement the Webhook handler the payment service in PHP for now as all I was trying to do was receive the information (Body) and place in a queue for processing.  

Cheers!

OK.  I checked my implementation and found I had changed back to a Get instead of Post, which is good for what I was doing. 

Jose might check the Post demo and maybe see if there is some issue (I think he's more familiar with that).  I don't recall if you've already said, but it will be helpful to know which Delphi and IW versions you are using.

When I was tinkering with this stuff I was surprised at how much data could be passed with Get these days (earlier it was very limited, 255 bytes I think).  Get was well within my requirements.  I'm officially lazy and Get was easier to test and play with, so ideal for me <g>.
  http://stackoverflow.com/questions/16172...e-to-a-get

Dan
Reply
#12
Hi Dan.

I am using Delphi 10.1 Berlin and IW 14.2.7 (migrating to 15 soon... once I update my CGDev license) I am able to get anything passed in on request as a parameter, either for normal request process or for content handler. Its nice when I get a signup request/redirect from Chargebee when a new account signs up to allow me to walk user through process of initial account setup.

Its just that with the webhook where they submit a post to my url with JSON in the body and that is the issue and I know I will also have this issue when I allow my clients to use Stripe, WePay etc and possibly others to receive donations into their accounts. It would be cool to do it all in Delphi and IW, but if I need to resort to PHP to grab the data, thats fine too.

Cheers!
Reply
#13
Content handlers can handle most HTTP requests. 17 does it to serve REST and other data.

In extreme cases you can use Indy internal to your app, but that is rarely needed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)