Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
compatibility Prestashop Validator
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoarau committed Jul 30, 2020
1 parent 0d47e83 commit d3f08ef
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion classes/StripeWebhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static function create()

Configuration::updateValue(Stripe_official::WEBHOOK_SIGNATURE, $webhookEndpoint->secret);
} catch (Exception $e) {
ProcessLoggerHandler::logError(
ProcessLoggerHandler::logError(
'Create webhook endpoint - '.(string)$e->getMessage(),
null,
null,
Expand Down
6 changes: 3 additions & 3 deletions classes/actions/ValidationOrderActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public function createOrder()
&& $this->conveyor['status'] == 'pending') {
$orderStatus = Configuration::get('STRIPE_OS_SOFORT_WAITING');
$this->conveyor['result'] = 4;
} else if ($this->conveyor['datas']['type'] == 'sepa_debit') {
} elseif ($this->conveyor['datas']['type'] == 'sepa_debit') {
$orderStatus = Configuration::get(Stripe_official::SEPA_WAITING);
$this->conveyor['result'] = 3;
} else {
Expand Down Expand Up @@ -474,12 +474,12 @@ public function chargeWebhook()
$order->update();

$history->addWithemail();
} elseif ($this->conveyor['event_json']->type == 'charge.expired' || $this->conveyor['event_json']->type == 'charge.refunded') {
} elseif ($this->conveyor['event_json']->type == 'charge.expired'
|| $this->conveyor['event_json']->type == 'charge.refunded') {
$order->setCurrentState(Configuration::get('PS_OS_CANCELED'));
} elseif ($this->conveyor['event_json']->type == 'charge.succeeded') {
$order->setCurrentState(Configuration::get('PS_OS_PAYMENT'));
} elseif ($this->conveyor['event_json']->type == 'charge.failed') {

$order->setCurrentState(Configuration::get('PS_OS_ERROR'));
}

Expand Down
2 changes: 1 addition & 1 deletion controllers/front/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function initContent()
// Set list of actions to execute
if (Tools::getValue('source')) {
$handler->addActions('prepareFlowRedirect', 'updatePaymentIntent', 'createOrder', 'addTentative');
} else if (Tools::getValue('payment_intent')) {
} elseif (Tools::getValue('payment_intent')) {
$handler->addActions('prepareFlowRedirectPaymentIntent', 'updatePaymentIntent', 'createOrder', 'addTentative');
} else {
$handler->addActions('prepareFlowNone', 'updatePaymentIntent', 'createOrder', 'saveCard', 'addTentative');
Expand Down
2 changes: 1 addition & 1 deletion views/templates/hook/admin_content_order.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<div class="tab-pane" id="StripePayment">
<p>
<span><strong>{l s='Payment ID' mod='stripe_official'}</strong></span><br/>
<span><a href="{$stripe_dashboardUrl.charge|escape:'htmlall'}" target="blank">{$stripe_charge}</a></span>
<span><a href="{$stripe_dashboardUrl.charge|escape:'htmlall'}" target="blank">{$stripe_charge|escape:'htmlall':'UTF-8'}</a></span>
</p>
<p>
<span><strong>{l s='Payment date' mod='stripe_official'}</strong></span><br/>
Expand Down

0 comments on commit d3f08ef

Please sign in to comment.