3.4 Laravel Package | Manage Shipping and Billing Details
Print
Modified on: Mon, Jan 23, 2023 at 5:31 PM
PayTabs is a payments infrastructure company providing exceptional solutions that are simple, secure, and scalable to drive local commerce and power financial inclusion across the MENA region.
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 manage/manipulate both shipping and billing/customer information in this package, as shown below:
The following parameters are required to be sent within the "sendCustomerDetails" function but optional to be sent within the "sendShippingDetails" function, as shown below:
Those two methods indicate the customer/billing details and shipping details for the initiated payment. Only if provided the payment page will be prefilled with these data.
The customer details are still required and must be passed, in case any of the details are missing or passed with invalid values; the cardholder will be required to enter any of the missing details on the payment page
SameAsBilling
The Parameter Tag/Name
same_as_billing
Data Type
BOOLEAN
Purpose
Indicates whether to use the same details as on customer/billing details or not
Required
❌
Name
The Parameter Tag/Name
name
Data Type
STRING
Purpose
Indicates the customer's valid name.
Min
3
Max
128
Required
✔ for billing details❌ for shipping details
Email
The Parameter Tag/Name
email
Data Type
STRING
Validation Rules
Valid email format
Purpose
Indicates the customer's valid email address. Preferred not to pass the same email with every transaction, as blocking any for a fraud attempt will cause blocking your payments at all.