-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrenew.php
More file actions
31 lines (25 loc) · 787 Bytes
/
renew.php
File metadata and controls
31 lines (25 loc) · 787 Bytes
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
<?php
/*
Docs: https://docs.scanpay.dev/subscriptions/renew-subscriber
support@scanpay.dk || irc.scanpay.dev:6697 #support
*/
require dirname(__FILE__) . '/../lib/Scanpay.php';
$apikey = '1153:YHZIUGQw6NkCIYa3mG6CWcgShnl13xuI7ODFUYuMy0j790Q6ThwBEjxfWFXwJZ0W';
$scanpay = new Scanpay\Scanpay($apikey);
$options = [
'hostname' => 'api.scanpay.dev',
'headers' => [
'X-Cardholder-IP' => '192.168.1.1',
]
];
$subscriberid = 5;
$data = [
'successurl' => 'https://docs.scanpay.dev/subscriptions/renew-subscriber',
'language' => 'da',
'lifetime' => '1h',
];
try {
print_r($renewURL = $scanpay->renew($subscriberid, $data, $options) . "\n");
} catch (Exception $e) {
die('Caught Scanpay client exception: ' . $e->getMessage() . "\n");
}