PayTabs Laravel Package makes integration with the PayTabs payment gateway very 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 pass the cart information within the initiation of the payment page. The following parameters are required to be sent within the "sendCart" function as shown below:
paypage::sendCart($cart_id, $cart_amount, $cart_description)
This "sendCart" method is Mandatory, not passing it would throw an exception.
Cart ID
The Parameter Tag/Name | cart_id |
Data Type | STRING |
Purpose | Indicates the cart/order id at the merchant end to easily relate the transaction to |
Min | 1 |
Max | 64 |
Required | ✔ |
Cart Amount
The Parameter Tag/Name | cart_amount |
Data Type | DECIMAL |
Purpose | Indicates the amount the customer is about to be charged with. Both min and max values are subjected to the merchant transaction limits |
Min | 0.01 |
Max | 9999999999.99 |
Required | ✔ |
Cart Description
The Parameter Tag/Name | cart_description |
Data Type | STRING |
Purpose | Indicates the cart/order description at the merchant end to easily relate the transaction to. |
Min | 1 |
Max | 128 |
Required | ✔ |
⌂ 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.