PayTabs Laravel Package makes integration with the PayTabs payment gateway easy by providing a ready-made payment class that handles the card entry, and billing & shipping information and completes the missing details.
This article is dedicated to walking you through how to manage and pass the return and the callback URLs. The following parameters should be sent within the "sendURLs" function as shown below:
Null is the default value for both. In other words, not passing this function at all will be the same as passing this a null value.
|The return URL is the URL that PayTabs will redirect the customer to after he finishes the payment process (whether it's authenticated or not). It will redirect the customer with a POST response that is sent with the client/cardholder redirection through his browser containing the basic transaction information once the payment process ends (whether the customer cancels, paid, or failed to pay). It depends on the customer's actions, which means if the customer closes the browser right after the payment without waiting to be redirected back to your system, you will not receive this response.
What is the Return URL vs the Callback URL?
|✔ if sendURLs() is used
The callback response is a server-to-server POST response that is sent (to a pre-defined HTTPS URL) with the full detailed transaction information once the payment process has ended (whether the customer cancels, paid, or failed to pay). It does not depend on the customer's actions; the response will be sent anyway.
|✔ if sendURLs() is used
Both parameters are required to be passed if you used the "sendURLs" function. However, one or both can set to be null.
By setting return to a null, customer will not be redirected back to any page, and by setting the callback to a null, your system will not receive the callback notification (with transaction full details) after the payment.
⌂ To get familiar with the whole process and the other steps, kindly navigate to our "The Laravel Packge Integration Manual" solution article.
⇦ And to get familiar with the rest of the steps regarding the previuos step "Step 2 - Configure the integration method" kindly click here.
⇦ And to get familiar with the rest of the steps regarding the current step "Step 3 - Initiating the payment" click here.
⇨ And to navigate to the next step in the integration process "Step 4 - Accepting the payment" kindly click here.