CoinPaymentsNet / coinpayments-php

MIT License
54 stars 30 forks source link

variables must be replace #10

Closed techyroots closed 4 years ago

techyroots commented 4 years ago
// Check for success of API call
if ($cps_api['error'] == 'ok') {
    // Prepare start of sample HTML output
    $output = '<table><tbody><tr><td>Username</td><td>Merchant ID</td><td>Email</td><td>Public Name</td></tr>';
    $output .= '<tr><td>' . $cps_api['result']['username'] . '</td><td>' . $cps_api['result']['merchant_id'] . '</td><td>' . $cps_api['result']['email'] . '</td><td>' . $cps_api['result']['public_name'] . '</td></tr>';
    // Close the sample output HTML and echo it onto the page
    $output .= '</tbody></table>';
    echo $output;
} else {
    // Throw an error if both API calls were not successful
    echo 'There was an error returned by the API call: ' . $balances['error'] . '<br>Rates API call status: ' . $rates['error'];
}

$cps_api should be replaced by $information in the above code

Crypto2 commented 4 years ago

Thanks, it is fixed now.