Skip to content

Commit

Permalink
Fixed check URL not to be absolute
Browse files Browse the repository at this point in the history
When user comes to URL like finance/pay/return/USERNAME/MERCHANT_NAME
relative paths do not work
  • Loading branch information
SilverFire committed Jul 26, 2018
1 parent 56eab77 commit a62b668
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/views/pay/return.php
@@ -1,7 +1,8 @@
<?php

/**
* @var View
* @var View $this
* @var string $transactionId
*/
use hipanel\helpers\Url;
use yii\web\View;
Expand All @@ -16,11 +17,12 @@

<?php
$options = \yii\helpers\Json::encode([
'url' => Url::to('check-return'),
'url' => Url::to(['@pay/check-return']),
'data' => [
'transactionId' => $transactionId,
],
]);

$this->registerJs(<<<JS
function checkPaymentStatus(options) {
$.ajax({
Expand Down Expand Up @@ -49,4 +51,4 @@ function checkPaymentStatus(options) {
JS
);

?>
?>

0 comments on commit a62b668

Please sign in to comment.