OnsitePaymentCheckoutComponent::setData PHP Méthode

setData() public méthode

public setData ( Order $order, array $data )
$order Order
$data array
    public function setData(Order $order, array $data)
    {
        //create payment?
    }

Usage Example

 /**
  * Set the model data for this component.
  *
  * This function should never rely on form.
  *
  * @param Order $order
  * @param array $data data to be saved into order object
  *
  * @throws Exception
  * @return Order the updated order
  */
 public function setData(Order $order, array $data)
 {
     $this->getGateway($order);
     if (!$this->isBraintree) {
         return parent::setData($order, $data);
     } else {
         return [];
     }
 }