Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Fix to use server error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ionux committed May 16, 2014
1 parent 99ef92c commit 5594e64
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions includes/modules/payment/bitpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@ class bitpay {
var $code, $title, $description, $enabled, $payment;

function log($contents){
return; // turn on to debug
$file = 'bitpay/log.txt';
file_put_contents($file, date('m-d H:i:s').": \n", FILE_APPEND);

if (is_array($contents))
foreach($contents as $k => $v)
file_put_contents($file, $k.': '.$v."\n", FILE_APPEND);
else
file_put_contents($file, $contents."\n", FILE_APPEND);
error_log($contents);
}

// class constructor
Expand Down Expand Up @@ -149,9 +141,6 @@ function after_process() {
);

$invoice = bpCreateInvoice($insert_id, $order->info['total'], $insert_id, $options);

$this->log("created invoice orderID=$insert_id with options: ".var_export($options, true));
$this->log("invoice: ".var_export($invoice, true));

if (!is_array($invoice) or array_key_exists('error', $invoice)) {
$this->log('createInvoice error '.var_export($invoice['error'], true));
Expand Down

0 comments on commit 5594e64

Please sign in to comment.