laravel - Paypal netshell package -
iam using netshell package , going , transactions completed suddenlly stopped working,after while figurd out in next function,redirect dosnt work
public function getcheckout($desc) { $payer = paypal::payer(); $payer->setpaymentmethod('paypal'); $amount = paypal:: amount(); $amount->setcurrency('usd'); $amount->settotal(1); // simple way, // can alternatively describe in order separately; // reference paypal php rest sdk details. $transaction = paypal::transaction(); $transaction->setamount($amount); $transaction->setdescription($desc); $redirecturls = paypal:: redirecturls(); $redirecturls->setreturnurl(url('/pay/done')); $redirecturls->setcancelurl(url('/pay/cancel')); $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; //dd($redirecturl); return redirect::to( $redirecturl ); } iam using redirect above,i tried dd $redirecturl var , got link,and went there manually , ok,even tried change " return redirect($redirecturl) " nothing happened,anyone got solution ?
Comments
Post a Comment