Reputation: 2097
I have implemented a webhook receiver for a payment gateway and on receiving a successful payment event I need to reply with the status 200 ok with the body "{ success: true }".
This is what I have in my code, but how do I send the body?
header("HTTP/1.1 200 OK");
Upvotes: 0
Views: 429
Reputation: 799
Just echo "{ success: true }"; 200 OK should be emitted by default, how about an unsuccessful payment? what do you need to send then.
Upvotes: 2