Commit 42aae672d105f5dbfcae4e07a51af809c9892eb1

Authored by Anastasia
1 parent be449e06

test privat for extrem

Showing 1 changed file with 7 additions and 3 deletions   Show diff stats
frontend/controllers/PrivatController.php
... ... @@ -93,9 +93,13 @@
93 93 $myFile = fopen($file, 'a') or die('Unable to open file!');
94 94 fwrite($myFile, "\n" . $data);
95 95 fclose($myFile);
96   -
97   - print_r($data);
98   - die();
  96 + $response = Json::decode($data);
  97 + //$order = OrderFrontend::findOne($response[ 'orderId' ]);
  98 + if ($response[ 'paymentState' ] === 'SUCCESS') {
  99 + print_r($response); die();
  100 + }
  101 +// print_r($data);
  102 +// die();
99 103 } else {
100 104 print_r(Url::to('/ru/order/callback', true));
101 105 print_r(\Yii::$app->session->get('data'));
... ...