PayPal\Api\Transaction::setTransactions PHP Method

setTransactions() public method

Additional transactions for complex payment scenarios.
public setTransactions ( self $transactions )
$transactions self
    public function setTransactions($transactions)
    {
        $this->transactions = $transactions;
        return $this;
    }

Usage Example

Esempio n. 1
0
 public function getPaymentReturn()
 {
     // echo "fdsfsd";
     // exit();
     $success = $_GET['success'];
     if ($success == 'true') {
         $order_id = $_GET['order_id'];
         $tmpTransaction = TmpTransaction::whereOrderId($order_id)->get()->first()->toArray();
         $payment = $this->executePayment($tmpTransaction['payment_id'], $_GET['PayerID']);
         $tran = new Transaction();
         $tran->setTransactions($payment->getTransactions());
         $response = json_decode($payment->toJSON());
         echo "<pre>";
         print_r($response);
         exit;
     } else {
         return Redirect::to('/product');
     }
 }