function it_creates_payment(GenericEvent $event, OrderInterface $order, PaymentProcessorInterface $processor)
 {
     $event->getSubject()->willReturn($order);
     $order->getLastPayment()->willReturn(false);
     $processor->processOrderPayments($order)->shouldBeCalled();
     $this->createOrderPayment($event);
 }
示例#2
0
 function it_runs_order_shipment_processor_and_payment_processor_to_control_order_shipments_and_payments(OrderInterface $order, OrderShipmentProcessorInterface $orderShipmentProcessor, PaymentProcessorInterface $paymentProcessor)
 {
     $orderShipmentProcessor->processOrderShipment($order)->shouldBeCalled();
     $paymentProcessor->processOrderPayments($order)->shouldBeCalled();
     $this->process($order);
 }
 /**
  * @param GenericEvent $event
  */
 public function createOrderPayment(GenericEvent $event)
 {
     $this->paymentProcessor->processOrderPayments($this->getOrder($event));
 }
示例#4
0
 /**
  * {@inheritdoc}
  */
 public function process(OrderInterface $order)
 {
     $this->orderShipmentProcessor->processOrderShipment($order);
     $this->paymentProcessor->processOrderPayments($order);
 }