You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+75Lines changed: 75 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,81 @@ $data = $ca->check_logs();
106
106
Same parameters as before, the `$data` returned can be checked here: https://cryptapi.io/docs/#/Bitcoin/btclogs
107
107
108
108
109
+
### Generating a QR code
110
+
111
+
```php
112
+
<?php
113
+
require 'vendor/autoload.php'; // Where your vendor directory is
114
+
115
+
$ca = new CryptAPI\CryptAPI($coin, $my_address, $callback_url, $parameters, $cryptapi_params);
116
+
$payment_address = $ca->get_address();
117
+
118
+
$qrcode = $ca->get_qrcode($value, $size);
119
+
```
120
+
121
+
For object creation, same parameters as before. You must first call `get_address` as this method requires the payment address to have been created.
122
+
123
+
For QR code generation:
124
+
125
+
``$value`` Value to request the user, in the main coin (BTC, ETH, etc). Optional, pass `false` to not add a value to the QR.
126
+
127
+
``$size`` Size of the QR Code image in pixels. Optional, pass `false` to use the default size of 512.
128
+
129
+
Response is an object with `qr_code` (base64 encoded image data) and `payment_uri` (the value encoded in the QR), see https://cryptapi.io/docs/#operation/btcqrcode for more information.
130
+
131
+
132
+
### Estimating transaction fees
133
+
134
+
```php
135
+
<?php
136
+
require 'vendor/autoload.php'; // Where your vendor directory is
0 commit comments