I'm using the lib PayPal-PHP-SDK on Laravel 4
and I have a problem with showing the order details. I followed the steps from Paypal Web Checkout and it doesn't showing me the order details.
it says "You'll be able to see your order details before you pay."
- Image Link
This is the method when I get the link to the payment:
public function checkout()
{
$apiContext = new ApiContext($this->cred, 'Request' . time());
$apiContext->setConfig($this->sdkConfig);
$payer = new Payer();
$payer->setPaymentMethod("paypal");
$amount = new Amount();
$amount->setCurrency("EUR");
$amount->setTotal("10");
$transaction = new Transaction();
$transaction->setDescription("Example");
$transaction->setCustom('abv');
$transaction->setAmount($amount);
$redirectUrls = new RedirectUrls();
$redirectUrls->setReturnUrl(URL::to('/') . '/payment/success/');
$redirectUrls->setCancelUrl(URL::to('/') . '/payment/cancel/');
$payment = new Payment();
$payment->setIntent("sale");
$payment->setPayer($payer);
$payment->setRedirectUrls($redirectUrls);
$payment->setTransactions(array($transaction));
$payment->create($apiContext);
print $payment->getApprovalLink();
}