コード例 #1
0
 /**
  * @param OrderInterface $order
  * @param                $propertyName
  * @param                $value
  */
 private function copyValue(OrderInterface $order, $propertyName, $value)
 {
     switch ($propertyName) {
         case TransformerProperties::GENERAL_CUSTOMER_IP:
             $order->setCustomerIp($value);
             break;
         case TransformerProperties::GENERAL_ORDER_ID:
             $order->setOrderId($value);
             break;
         case TransformerProperties::GENERAL_ADDITIONAL_DESC:
             $order->setAdditionalDescription($value);
             break;
         case TransformerProperties::GENERAL_CURRENCY_CODE:
             $order->setCurrencyCode($value);
             break;
         case TransformerProperties::GENERAL_DESCRIPTION:
             $order->setDescription($value);
             break;
         case TransformerProperties::GENERAL_MERCHANT_POS_ID:
             $order->setMerchantPosId($value);
             break;
         case TransformerProperties::GENERAL_SIGNATURE:
             $order->setSignature($value);
             break;
         case TransformerProperties::GENERAL_TOTAL_AMOUNT:
             $order->setTotalAmount($value);
             break;
         default:
     }
 }
コード例 #2
0
 protected function _before()
 {
     $this->serializer = new Serializer(SerializerBuilder::create()->build(), new GroupsSpecifier($this->getLogger()), $this->getLogger());
     $this->order = new Order();
     $this->order->setMerchantPosId(123)->setDescription('test')->setContinueUrl('test')->setCustomerIp('127.0.0.1')->setOrderId('123');
 }
コード例 #3
0
 /**
  * @param OrderInterface         $order
  * @param ConfigurationInterface $configuration
  */
 public function autocomplete(OrderInterface $order, ConfigurationInterface $configuration)
 {
     $order->setMerchantPosId($configuration->getCredentials()->getMerchantPosId());
 }