File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff 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 ) &emsp ;
Original file line number Diff line number Diff line change 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}
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments