Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function getSendbankOrder(BasketInterface $basket)
 {
     $order = $basket->getPaymentMethod()->getTransformer('basket')->transformIntoOrder($basket);
     // save the order
     $this->orderManager->save($order);
     // assign correct reference number
     $this->referenceGenerator->order($order);
     $basket->reset();
     return $order;
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function getSendbankOrder(BasketInterface $basket)
 {
     $order = $basket->getPaymentMethod()->getTransformer('basket')->transformIntoOrder($basket);
     $event = new PaymentEvent($order);
     $this->getEventDispatcher()->dispatch(PaymentEvents::PRE_SENDBANK, $event);
     // save the order
     $this->orderManager->save($order);
     // assign correct reference number
     $this->referenceGenerator->order($order);
     $event = new PaymentEvent($order);
     $this->getEventDispatcher()->dispatch(PaymentEvents::POST_SENDBANK, $event);
     return $order;
 }