-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaymentrequest.php
21 lines (14 loc) · 60.6 KB
/
paymentrequest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
date_default_timezone_set('Africa/Harare');
require_once 'vendor/autoload.php';
$paynow = new Paynow\Payments\Paynow(
'11238',
'fdce1fd3-de5e-428a-bc11-c5d49583d574',
'https://fuelticketing.com/api/success.php?email=' . $email,
'https://fuelticketing.com/api/payment.php'
);
$invoiceNumber = str_pad(mt_rand(0, 999999), 2, '0', STR_PAD_LEFT);
$payment = $paynow->createPayment('Invoice : '.$invoiceNumber, $email);
$payment->add('Fuel', floatval($amount));
$response = $paynow->send($payment);
?>