forked from chrysophylax69/influx-whmcs-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINFXcoin.php
52 lines (38 loc) · 1.37 KB
/
INFXcoin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
function infxcoin_config() {
$configarray = array(
"FriendlyName" => array("Type" => "System", "Value"=>"INFXcoin"),
"INFXcoinAddress" => array("FriendlyName" => "Your INFXcoin address where you want to receive your INFXcoins", "Type" => "text", ),
);
return $configarray;
}
function infxcoin_link($params) {
# Gateway Specific Variables
$infxaddr = $params['INFXcoinAddress'];
# Invoice Variables
$invoiceid = $params['invoiceid'];
$amount = $params['amount']; # Format: ##.##
$currency = $params['currency']; # Currency Code
# Client Variables
$firstname = $params['clientdetails']['firstname'];
$lastname = $params['clientdetails']['lastname'];
$email = $params['clientdetails']['email'];
# System Variables
$systemurl = $params['systemurl'];
$req = array(
'INFXaddr' => $infxaddr,
'invoiceId' => $invoiceid,
'systemURL' => $systemurl,
'Amount' => $amount,
'Currency' => $currency,
'buyerName' => "$firstname $lastname",
);
$form = '<form action="'.$systemurl.'/modules/gateways/infxcoin/invoice.php" method="POST">';
foreach ($req as $required => $value) {
$form.= '<input type="hidden" name="'.$required.'" value = "'.$value.'" />';
}
$form.='<input type="submit" value="'.$params['langpaynow'].'" />';
$form.='</form>';
return $form;
}
?>