Closed vipinbabra closed 4 years ago
Hi guys. I need to recover the Item details in our controller class. I'm using the getItems() method
Error:
Undefined property: laravel\pagseguro\Transaction\Information\Information::$getItems
Config file: /**/ 'notification' => [ 'callback' => ['Mbk\Payments\Controllers\Frontend\NotificationController', 'paymentNotification'], // 'credential' => 'default', // Callable resolve credential function (notificationCode) : Credentials {} 'route-name' => 'mbk.orders.payment.notify', // Criar uma rota com este nome ],
/****/ class NotificationController extends Controller{
public function paymentNotification() { \App::make('pagseguro'); // Register PagSeguro $platform = Config::getPlatform(); $params = array_merge([ 'notificationCode' => null, 'notificationType' => null, ], $platform->getUrlParameters()); $code = $params['notificationCode']; $type = $params['notificationType']; if (empty($code) || empty($type)) { $platform->abort(); return; } $credential = $this->getCredentialsTo($code); $notification = new Notification($code, $type); $info = $notification->check($credential);
\Log::debug(print_r($info->getItems, 1)); }
}
How can I get this data?
Hi guys. I need to recover the Item details in our controller class. I'm using the getItems() method
Error:
Undefined property: laravel\pagseguro\Transaction\Information\Information::$getItems
Config file: /**/ 'notification' => [ 'callback' => ['Mbk\Payments\Controllers\Frontend\NotificationController', 'paymentNotification'], // 'credential' => 'default', // Callable resolve credential function (notificationCode) : Credentials {} 'route-name' => 'mbk.orders.payment.notify', // Criar uma rota com este nome ],
/****/ class NotificationController extends Controller{
public function paymentNotification() {
\App::make('pagseguro'); // Register PagSeguro $platform = Config::getPlatform(); $params = array_merge([ 'notificationCode' => null, 'notificationType' => null, ], $platform->getUrlParameters()); $code = $params['notificationCode']; $type = $params['notificationType']; if (empty($code) || empty($type)) { $platform->abort(); return; } $credential = $this->getCredentialsTo($code); $notification = new Notification($code, $type); $info = $notification->check($credential);
}
How can I get this data?