dimti
2 months ago
6 changed files with 40 additions and 29 deletions
-
10Plugin.php
-
16classes/DefaultMoneyRepair.php
-
28classes/SberCheckout.php
-
1lang/en/lang.php
-
1lang/ru/lang.php
-
13routes.php
@ -1,16 +0,0 @@ |
|||
<?php namespace Wpstudio\Sber\Classes; |
|||
|
|||
use OFFLINE\Mall\Classes\Utils\DefaultMoney; |
|||
|
|||
/*** |
|||
* Helper class to solve this problem https://github.com/OFFLINE-GmbH/oc-mall-plugin/issues/258 |
|||
* paypal error after redirect to site |
|||
* After payment via PayPal upon returning to the site, we get an error Call to a member function getCurrent() on null |
|||
*/ |
|||
class DefaultMoneyRepair extends DefaultMoney |
|||
{ |
|||
final protected function render($contents, array $vars): string |
|||
{ |
|||
return number_format($vars['price'],$vars['currency']->decimals, ',', ' ').' '.$vars['currency']->symbol; |
|||
} |
|||
} |
@ -0,0 +1,13 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Http\Request; |
|||
use Wpstudio\Sber\Classes\SberCheckout; |
|||
|
|||
Route::post('/sber-checkout', function (Request $request) { |
|||
|
|||
$sberCheckout = new SberCheckout(); |
|||
|
|||
$sberCheckout->changePaymentState($request); |
|||
|
|||
return exit(); |
|||
}); |
Write
Preview
Loading…
Cancel
Save
Reference in new issue