michaeldouglas / laravel-pagseguro

Integração com o gateway de pagamento pagseguro, para utilização com o Laravel
358 stars 119 forks source link

getItems() Method #135

Closed vipinbabra closed 4 years ago

vipinbabra commented 6 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?