Пример #1
0
<?php

// import paytabs class
require 'PayTabs.php';
//make sure to set the right value in paytabs_config.php file
//create new paytabs object
$paytabs = new PayTabs();
print $paytabs->validate();
Пример #2
0
<?php

// import paytabs class
require 'PayTabs.php';
//make sure to set the right value in paytabs_config.php file
//create new paytabs object
$paytabs = new PayTabs();
/*
		-title: payment title
		-ref_number: number from your system to track the order
		-currency: 3 character for currency 
		-customer_ip: customer ip address
		-page_language: the language of the payment page
*/
$paytabs->set_page_setting('title', 'ref number', 'BHD', '127.0.0.1', 'English');
/*
		-customer first name
		-customer last name
		-customer international phone number
		-customer phone number
		-customer email
*/
$paytabs->set_customer('Muhsan', 'Taher', '00973', '12345678', '*****@*****.**');
/*
	-Item name
	-item price in the same currency set in paytabs_config.php file
	-item quantity 
*/
$paytabs->add_item('New item', '10', '2');
$paytabs->add_item('New item2', '20', '2');
/*