forked from 3ttercap/LocalBitcoins-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_invoices.php
61 lines (51 loc) · 1.71 KB
/
example_invoices.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
53
54
55
56
57
58
59
60
61
<?php
/* Uncomment if you wish to change default keys */
// $API_AUTH_KEY = '';
// $API_AUTH_SECRET = '';
$Lbc_Merchant = new LocalBitcoins_Merchant_API($API_AUTH_KEY,$API_AUTH_SECRET);
/** ---------------------------------------------------------------- TEST OK (pagination not tested)
/* Base: "/api/merchant/invoices/"
/* Documentation: https://localbitcoins.com/api-docs/#invoices
/* Permissions: Read
**/
/*
// for pagination use an array in params eg: $Lbc_Merchant->Invoices()(array('id__gt='=>'50'));
$res = $Lbc_Merchant->Invoices();
print_r($res);
*/
/** ---------------------------------------------------------------- TEST OK
/* Base: "/api/merchant/new_invoice/"
/* Documentation: https://localbitcoins.com/api-docs/#new-invoice
/* Permissions: Read
**/
/*
$arguments = array(
'currency' => 'CAD',
'amount' => '29.99',
'description' => 'Product #1',
// optional arguments
'return_url' => 'https://myweb.site/invoices/123456/'
);
$res = $Lbc_Merchant->NewInvoice($arguments);
print_r($res);
*/
/** ---------------------------------------------------------------- TEST OK
/* Base: "/api/merchant/invoice/{invoice_id}/"
/* Documentation: https://localbitcoins.com/api-docs/#invoice-id
/* Permissions: Read
**/
/*
$invoice_id = 'zfJ2eVW2HhSWyGNhX34K9';
$res = $Lbc_Merchant->Invoice($invoice_id);
print_r($res);
*/
/** ---------------------------------------------------------------- TEST OK
/* Base: "/api/merchant/delete_invoice/{invoice_id}/"
/* Documentation: https://localbitcoins.com/api-docs/#invoice-delete
/* Permissions: Read,Write
**/
/*
$invoice_id = 'zfJ2eVW2HhSWyGNhX34K9';
$res = $Lbc_Merchant->DeleteInvoice($invoice_id);
print_r($res);
*/