Skip to content

Commit 5f97508

Browse files
author
CryptAPI
committed
small bugfixes
1 parent b6de8ad commit 5f97508

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ext-curl
1414

1515

1616
```
17-
composer require cryptapi/php-cryptapi
17+
composer require cryptapi/php-cryptapi:1.0.1
1818
```
1919

2020
[on GitHub](https://github.com/cryptapi/php-cryptapi)  

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
},
2121
"require": {
2222
"php": ">=5.5.0",
23-
"ext-curl": "*"
23+
"ext-curl": "*",
24+
"ext-json": "*"
2425
},
2526
"autoload": {
2627
"psr-4": {
2728
"CryptAPI\\": "cryptapi/"
2829
}
2930
},
30-
"version": "1.0"
31+
"version": "1.0.1"
3132
}

cryptapi/cryptapi.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,16 @@ public function get_address() {
4040

4141
if (empty($this->own_address) || empty($this->coin) || empty($this->callback_url)) return null;
4242

43+
$req_parameters = http_build_query($this->parameters);
44+
$callback_url = "{$this->callback_url}?{$req_parameters}";
45+
4346
$ca_params = [
44-
'callback' => $this->callback_url,
47+
'callback' => $callback_url,
4548
'address' => $this->own_address,
4649
'pending' => $this->pending,
4750
];
4851

49-
$response = $this->_request('create', array_merge($ca_params, $this->parameters));
52+
$response = $this->_request('create', $ca_params);
5053

5154
if ($response->status == 'success') {
5255
return $response->address_in;

0 commit comments

Comments
 (0)