src/Twisto/Twisto.php
public function getCheckPayload(Customer $customer, Order $order, $previous_orders)
    {
        $payload = json_encode(array(
            'random_nonce' => uniqid('', true),
            'customer' => $customer->serialize(),
            'order' => $order->serialize(),
            'previous_orders' => array_map(function (Order $item) {
                return $item->serialize();
            }, $previous_orders)
        ));
        return $this->encrypt($this->compress($payload));
    }
public function getCheckPayload(Customer $customer, Order $order, $previous_orders)
    {
        $payload = json_encode(array(
            'random_nonce' => uniqid('', true),
            'customer' => $customer->serialize(),
            'order' => $order->serialize(),
            'previous_orders' => array_map(function (Order $item) {
                return $item->serialize();
            }, $previous_orders)
        ));
        return $this->encrypt($this->compress($payload));
    }
public function getCheckPayload ( Customer $ customer , Order $ order , $ previous_orders ) { $ payload = json_encode ( array ( 'random_nonce' => uniqid ( '' , true ) , 'customer' => $ customer -> serialize ( ) , 'order' => $ order -> serialize ( ) , 'previous_orders' => array_map ( function ( Order $ item ) { return $ item -> serialize ( ) ; } , $ previous_orders ) ) ) ; return $ this -> encrypt ( $ this -> compress ( $ payload ) ) ; }
Create check payload
@param Customer $customer
@param Order $order
@param Order[] $previous_orders
@return string
Create check payload