Skip to content

Commit

Permalink
Merge pull request #10 from blockonomics/missing-order
Browse files Browse the repository at this point in the history
Set order status as Pending as soon as order is created. Issue #5
  • Loading branch information
blockonomics authored Dec 9, 2019
2 parents d44a0b9 + a9dae62 commit 81bf2e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions admin/controller/extension/payment/blockonomics.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ public function gensecret() {
$default_callback_url = $this->url->link('extension/payment/blockonomics/callback&secret='.$secret , $this->config->get('config_secure'));
$default_callback_url = str_replace(HTTP_SERVER, HTTP_CATALOG, $default_callback_url);
$default_callback_url = str_replace(HTTPS_SERVER, HTTPS_CATALOG, $default_callback_url);
$default_callback_url = str_replace('&1', '', $default_callback_url);

$this->setting('callback_url', $default_callback_url);
$this->setting('callback_secret', $secret);
Expand Down Expand Up @@ -242,6 +243,7 @@ public function install() {
$default_callback_url = $this->url->link('extension/payment/blockonomics/callback&secret='.$secret , $this->config->get('config_secure'));
$default_callback_url = str_replace(HTTP_SERVER, HTTP_CATALOG, $default_callback_url);
$default_callback_url = str_replace(HTTPS_SERVER, HTTPS_CATALOG, $default_callback_url);
$default_callback_url = str_replace('&1', '', $default_callback_url);

$data['default_callback_url'] = $default_callback_url;
$this->db->query("DELETE FROM ".DB_PREFIX."setting WHERE code = 'blockonomics'");
Expand Down
2 changes: 2 additions & 0 deletions catalog/controller/extension/payment/blockonomics.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ public function invoice() {
$data['satoshi_amount'] = $satoshi_amount;
$data['fiat_amount'] = $fiat_amount;
$order_id = $order_info['order_id'];

$this->model_checkout_order->addOrderHistory($order_id, 1, "", true);

$current_time = time();
$data['orderTimestamp'] = $current_time;
Expand Down

0 comments on commit 81bf2e5

Please sign in to comment.