netshel paypal的getCheckout函数出错


Error with getCheckout function in netshel paypal

在尝试使用laravel 配置paypal时出现此错误

FatalErrorException在Paypalel.php第32行:非抽象方法App'Http'Controllers'Paypalel::getCheckout()必须包含body

这是代码:

public function getCheckout($title,$disc,$price);
{

// get the id of the product
$payer = PayPal::Payer();
$payer->setPaymentMethod('paypal');
$amount = PayPal:: Amount();
$amount->setCurrency('USD');
$amount->setTotal($price); // This is the simple way,
// you can alternatively describe everything in the order separately;
// Reference the PayPal PHP REST SDK for details.
$transaction = PayPal::Transaction();
$transaction->setAmount($amount);
$transaction->setDescription($disc);
$redirectUrls = PayPal:: RedirectUrls();
$redirectUrls->setReturnUrl(action('ProductController@getDone'));
$redirectUrls->setCancelUrl(action('ProductController@getCancel'));
$payment = PayPal::Payment();
$payment->setIntent('sale');
$payment->setPayer($payer);
$payment->setRedirectUrls($redirectUrls);
$payment->setTransactions(array($transaction));
$response = $payment->create($this->_apiContext);
$redirectUrl = $response->links[1]->href;
return Redirect::to( $redirectUrl );
}

有一个多余的分号;

public function getCheckout($title,$disc,$price); {
                                                ^

删除

public function getCheckout($title,$disc,$price) {