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:


Through out the article we will use the same concepet clarified in our How to remove/hide the billing/shipping information?  solution article.





The following parameters are required to be sent within the "sendCustomerDetails" function but optional to be sent within the "sendShippingDetails" function, as shown below:

sendCustomerDetails($name, $email, $phone, $street1, $city, $state, $country, $zip, $ip)
sendShippingDetails($same_as_billing, $name = null, $email = null, $phone = null, $street1 = null, $city = null, $state = null, $country = null, $zip = null, $ip = null)


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/Namesame_as_billing
Data TypeBOOLEAN
PurposeIndicates whether to use the same details as on customer/billing details or not
Required❌ 
 

Name


The Parameter Tag/Namename
Data TypeSTRING
PurposeIndicates the customer's valid name.
Min3
Max128
Required✔   for billing details❌ for shipping details
 



Email


The Parameter Tag/Nameemail
Data TypeSTRING
Validation RulesValid email format
PurposeIndicates 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.
Min-
Max-
Required✔   for billing details❌ for shipping details
 



Phone


The Parameter Tag/Namephone
Data TypeSTRING
Validation Rules

Valid number + country code prefix

PurposeIndicates the customer's valid phone number
Min-
Max-
Required✔   for billing details❌ for shipping details
 



Street1


The Parameter Tag/Namestreet1
Data TypeSTRING
PurposeIndicates the customer's valid address.
Min3
Max128
Required✔   for billing details❌ for shipping details
 



City


The Parameter Tag/Namecity
Data TypeSTRING
PurposeIndicates the customer's valid city name.
Min3
Max128
Required✔   for billing details❌ for shipping details
 



State


The Parameter Tag/Namestate
Data TypeSTRING
Validation Rules

ISO 3166-1 alpha-2 code (two-letter state codes)

PurposeIndicates the customer's valid state name.
Min2
Max2
Required✔   for billing details❌ for shipping details
 



Country


The Parameter Tag/Namecountry
Data TypeSTRING
Validation Rules

ISO 3166-1 alpha-2 code (two-letter state codes)

PurposeIndicates the customer's valid state name.
Min2
Max2
Required✔   for billing details❌ for shipping details
 



Zip


The Parameter Tag/Namezip
Data TypeSTRING
Validation Rules

Valid/related zip code

PurposeIndicates the customer's valid zip code.
Min-
Max-
Required✔   for billing details❌ for shipping details
 


IP


The Parameter Tag/Nameip
Data TypeSTRING
Validation Rules

Valid IP address

PurposeIndicates the customer's valid IP address.
Min-
Max-
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.