File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -614,6 +614,28 @@ public function buildFromOrder(Order $order)
614614 foreach ($ order ->getOrderProducts () as $ orderProduct ) {
615615 $ this ->addProduct ((new PayPlugProduct ())->buildFromOrderProduct ($ orderProduct , $ payPlugDeliveryType ));
616616 }
617+
618+ switch ($ payPlugDeliveryType ) {
619+ case "carrier " :
620+ $ shippingDeliveryType = $ order ->getChoosenDeliveryAddress () !== $ order ->getChoosenInvoiceAddress () ? "NEW " : "BILLING " ;
621+ break ;
622+ case "storepickup " :
623+ $ shippingDeliveryType = "SHIP_TO_STORE " ;
624+ break ;
625+ case "networkpickup " :
626+ $ shippingDeliveryType = "VERIFIED " ;
627+ break ;
628+ case "travelpickup " :
629+ $ shippingDeliveryType = "TRAVEL_OR_EVENT " ;
630+ break ;
631+ case "edelivery " :
632+ $ shippingDeliveryType = "DIGITAL_GOODS " ;
633+ break ;
634+ default :
635+ $ shippingDeliveryType = "BILLING " ;
636+ }
637+
638+ $ this ->setShippingDeliveryType ($ shippingDeliveryType );
617639 }
618640
619641 return $ this ;
You can’t perform that action at this time.
0 commit comments