php - Unable to get session data from paypal express checkout in laravel 4 -
i unable session information in omnipay laravel 4 after getting express checkout return after making express checkout.
i tokens , payerid noting else. session data of site become empty.
please tell how can completepurchase process. there way purchase order id paypal. using omnipay.
public function dosaveandprocessedtopaypal( $purchaseorder) { $purchaseorderid = $purchaseorder->id; session::put('currentuseremail', $email); session::put('purchaseorderid', $purchaseorderid); session::put('amount', $amount); $gateway = $this->getpaypalgateway(); $items = new omnipay\common\itembag(); $items->add(array( 'name' => $productname, 'quantity' => '1', 'price' => (float)$amount, )); $response = $gateway->purchase( array( 'cancelurl' => cancel_url, 'returnurl' => return_url, 'amount' => (float)$amount, 'currency' => $currency ) )->setitems($items)->send(); $response->redirect(); } public function doperformpostpaymentoperation() { $gateway = $this->getpaypalgateway(); $purchaseorderid = session::get('purchaseorderid'); $amount = session::get('amount'); $currency = session::get('currency'); $data = session::all(); echo "<pre>"; print_r( $data ); echo "</pre>"; echo $purchaseorderid; die(); $response = $gateway->completepurchase(array( 'transactionid' => "ord-".$purchaseorderid, 'transactionreference' => "ref-".$purchaseorderid, 'amount' => (float)$amount, 'currency' => $currency, ))->send(); if ( ! $response->issuccessful()) { throw new exception($response->getmessage()); } } output array ( [_token] => lnvg1s3eu2jshjsciotjixeehiswzvx47darldxe [flash] => array ( [old] => array ( ) [new] => array ( ) ) )
Comments
Post a Comment