last corrections for payments

This commit is contained in:
Kevin Adametz 2019-03-19 15:45:46 +01:00
parent 044a6bf253
commit 6db007fc82
53 changed files with 1514 additions and 1177 deletions

View file

@ -8,6 +8,7 @@ use App\Mail\MailCheckout;
use App\Models\PaymentTransaction;
use App\Models\ShoppingOrder;
use App\Models\ShoppingPayment;
use App\Services\Util;
use App\User;
use Illuminate\Support\Facades\Mail;
@ -27,17 +28,18 @@ class PayoneController extends Controller
$data = \Request::all();
// test para
/* $data = [
/* $data = [
'key' => '698fb2555f8b2efc74f60b2121421f45',
'txaction' => 'paid',
'clearingtype' => 'wlt',
'userid' => '158006846',
'txid' => '320267294',
'price' => '59.00',
'param' => '18', //$this->shopping_order->id,
'reference' => '15c79ba77992e2',
'userid' => '158723953',
'txid' => '321623031',
'price' => '89.00',
'param' => '1', //$this->shopping_order->id,
'reference' => '15c83aee2766c3',
];
*/
*/
if(!isset($data['key']) || !isset($data['param']) || !isset($data['userid']) || !isset($data['txid']) || !isset($data['reference']) || !isset($data['price'])){
\Log::channel('payone')->error('PaymentStatus: parameter incomplete: '.json_encode($data));
@ -100,7 +102,7 @@ class PayoneController extends Controller
'status' => 'PAYONE',
'key' => $data['key'],
'txaction' => $data['txaction'],
'transmitted_data' => $data,
'transmitted_data' => Util::utf8ize($data),
]);
$shopping_order->txaction = $data['txaction'];