Skip to content

Commit

Permalink
IPN Notification Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoshualewis committed Apr 15, 2021
1 parent 3560a52 commit e4c227e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ public function __construct($item)

}

public function BPC_checkInvoiceStatus($orderID)
public function BPC_checkInvoiceStatus($orderID,$bitpay_token)
{

$post_fields = ($this->item->item_params);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://' . $this->item->invoice_endpoint . '/' . $post_fields->invoiceID);
curl_setopt($ch, CURLOPT_URL, 'https://' . $this->item->invoice_endpoint . '/' . $post_fields->invoiceID.'?token='.$bitpay_token);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ function BPC_autoloader($class)

$invoice = new BPC_Invoice($item); //this creates the invoice with all of the config params

$orderStatus = json_decode($invoice->BPC_checkInvoiceStatus($order_invoice));
$orderStatus = json_decode($invoice->BPC_checkInvoiceStatus($order_invoice,$bitpay_token));
$invoice_status = $orderStatus->data->status;

switch ($event['name']) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<config>
<modules>
<BitpayCheckout_BPCheckout>
<version>3.1.5</version>
<version>3.1.6</version>
</BitpayCheckout_BPCheckout>
</modules>

Expand Down

0 comments on commit e4c227e

Please sign in to comment.