
Integrating PhonePe with your PHP-based website allows you to offer a seamless payment experience. This guide walks you through creating a payment order, redirecting the user to PhonePe, and handling the callback to confirm the transaction.
Integrating PhonePe with your PHP-based website allows you to offer a seamless payment experience. This guide walks you through creating a payment order, redirecting the user to PhonePe, and handling the callback to confirm the transaction.
After the customer places an order, show a confirmation page summarizing their order. Include a Submit & Pay button that, when clicked, redirects the user to checksum.php
.
checksum.php
Fetch the order details and generate a unique transaction ID. Then, create the payload:
Embed the checkout script and initiate the transaction:
After payment completion, PhonePe will send a POST request to your callback.php
with transaction details.
Store the callback and status response for logging or debugging:
Then, check the payment status:
(2) (0)
No comments