Beispiel #1
0
 /**
  * Convert quote payment object to payment data object
  *
  * @param \Magento\Sales\Model\Quote\Payment $object
  * @return QuotePaymentMethod
  */
 public function toDataObject(\Magento\Sales\Model\Quote\Payment $object)
 {
     $data = [QuotePaymentMethod::METHOD => $object->getMethod(), QuotePaymentMethod::PO_NUMBER => $object->getPoNumber(), QuotePaymentMethod::CC_OWNER => $object->getCcOwner(), QuotePaymentMethod::CC_NUMBER => $object->getCcNumber(), QuotePaymentMethod::CC_TYPE => $object->getCcType(), QuotePaymentMethod::CC_EXP_YEAR => $object->getCcExpYear(), QuotePaymentMethod::CC_EXP_MONTH => $object->getCcExpMonth(), QuotePaymentMethod::PAYMENT_DETAILS => $object->getAdditionalData()];
     return $this->builder->populateWithArray($data)->create();
 }