diff --git a/Model/PaymentManagement.php b/Model/PaymentManagement.php index 4db326e..f1b7243 100644 --- a/Model/PaymentManagement.php +++ b/Model/PaymentManagement.php @@ -204,13 +204,14 @@ public function saveCheckoutPaymentInformationFacade( public function wrapCallPaylineApiDoWebPaymentFacade($cartId) { + $cart = $this->cartRepository->getActive($cartId); $response = $this->callPaylineApiDoWebPaymentFacade( - $this->cartRepository->getActive($cartId), + $cart, $this->paylineCartManagement->getProductCollectionFromCart($cartId), $this->cartTotalRepository->get($cartId), $this->quotePaymentMethodManagement->get($cartId), $this->quoteBillingAddressManagement->get($cartId), - $this->quoteShippingAddressManagement->get($cartId) + $cart->getIsVirtual() ? null : $this->quoteShippingAddressManagement->get($cartId) ); return [ diff --git a/PaylineApi/Request/DoWebPayment.php b/PaylineApi/Request/DoWebPayment.php index 941a659..d344d12 100644 --- a/PaylineApi/Request/DoWebPayment.php +++ b/PaylineApi/Request/DoWebPayment.php @@ -105,7 +105,7 @@ public function setBillingAddress(AddressInterface $billingAddress) return $this; } - public function setShippingAddress(AddressInterface $shippingAddress) + public function setShippingAddress(AddressInterface $shippingAddress = null) { $this->shippingAddress = $shippingAddress; return $this; diff --git a/README.md b/README.md index 7431ab3..82773dc 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,13 @@ composer config repositories.paylinebymonext-payline-magento-2 vcs https://githu composer require monext/module-payline php -f bin/magento module:enable Monext_Payline -php -f bin/magento setup:upgrade \ No newline at end of file +php -f bin/magento setup:upgrade + +## Configuration +*Find Payline configuration menu under STORES > Settings > Configuration > SALES > Payment Methods +*Fill your merchant ID and access key under the "Common settings" section. +*Contracts are imported under the "Payline Contracts" section. The multi-select "Contracts" fied allows to choose which one will be visible on your store. +* "Payment solutions" section displays the "Payline - Web Payment Cpt" method configuration (more to come). Select your payment options and order status mapping in this section. + +## Payline Category Mapping +The dedicated "Payline Category Mapping" field is added by the Payline extension under the "Content" section of each product category. The drop-down list allows to map your custom category with one from Payline's nomenclature. This mapping is necessary for partner solutions like Oney, Cofinoga, Cetelem,...