Skip to content

Commit

Permalink
Merge pull request conekta#47 from conekta/fix/webhook-ping
Browse files Browse the repository at this point in the history
This fix verifies the data information before proceeding to do any op…
  • Loading branch information
Fernando Ruiz authored Mar 10, 2017
2 parents 6887917 + 8b212bb commit f6cf3b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
=== 1.0.0 2016-06-14
* Fix validation and templating errors.
=== 2.0.0 2017-02-02
* Adapt plugin to use API 2.0.0.
* Adapt plugin to use API 2.0.0.
=== 2.0.4 2017-02-02
* Several bugs fixed on webhook handling.
2 changes: 1 addition & 1 deletion conektaprestashop.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct()
{
$this->name = 'conektaprestashop';
$this->tab = 'payments_gateways';
$this->version = '2.0.0';
$this->version = '2.0.4';
$this->author = 'Conekta';
$this->bootstrap = true;
parent::__construct();
Expand Down
2 changes: 1 addition & 1 deletion notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
authenticateEvent($body, $_SERVER['HTTP_DIGEST']);
$event_json = Tools::jsonDecode($body);

if ($event_json->type == 'order.paid') {
if ($event_json->type == 'order.paid' && isset($event_json->data)) {
$conekta_order = $event_json->data->object;

$reference_id = (integer) $conekta_order->metadata->reference_id;
Expand Down

0 comments on commit f6cf3b2

Please sign in to comment.