diff --git a/Block/Method/Info.php b/Block/Method/Info.php index 827ec2f..68b48e8 100644 --- a/Block/Method/Info.php +++ b/Block/Method/Info.php @@ -225,7 +225,7 @@ public function getTransactionState() public function formatAmount($amount) { //NULL was changed to 0 because PHP8.1 does not allow NULL as parameter - return $this->priceCurrency->format($amount, 0, 0, 0, $this->getTransaction() + return $this->priceCurrency->format($amount, 0, PriceCurrencyInterface::DEFAULT_PRECISION, 0, $this->getTransaction() ->getCurrency()); } /** diff --git a/Model/Service/Order/TransactionService.php b/Model/Service/Order/TransactionService.php index 71bf0bb..f499a80 100644 --- a/Model/Service/Order/TransactionService.php +++ b/Model/Service/Order/TransactionService.php @@ -515,6 +515,7 @@ public function void(Order $order) /** * Marks the delivery indication belonging to the given payment as suitable. + * Note: there are no delivery indication for Authorized transactions * * @param Order $order * @return \PostFinanceCheckout\Sdk\Model\DeliveryIndication @@ -528,6 +529,7 @@ public function accept(Order $order) /** * Marks the delivery indication belonging to the given payment as not suitable. + * Note: there are no delivery indication for Authorized transactions * * @param Order $order * @return \PostFinanceCheckout\Sdk\Model\DeliveryIndication diff --git a/Model/Webhook/Listener/Transaction/AuthorizedCommand.php b/Model/Webhook/Listener/Transaction/AuthorizedCommand.php index 07cc2b5..c1cca4d 100644 --- a/Model/Webhook/Listener/Transaction/AuthorizedCommand.php +++ b/Model/Webhook/Listener/Transaction/AuthorizedCommand.php @@ -63,7 +63,7 @@ public function execute($entity, Order $order) $payment->registerAuthorizationNotification($entity->getAuthorizationAmount()); if ($entity->getState() != TransactionState::FULFILL) { - $order->setState(Order::STATE_PAYMENT_REVIEW); + $order->setState(Order::STATE_PENDING_PAYMENT); $order->addStatusToHistory('pending', \__('The order should not be fulfilled yet, as the payment is not guaranteed.')); } diff --git a/Observer/CollectOrderAttributeMetaData.php b/Observer/CollectOrderAttributeMetaData.php index 91ae420..faff738 100644 --- a/Observer/CollectOrderAttributeMetaData.php +++ b/Observer/CollectOrderAttributeMetaData.php @@ -65,15 +65,21 @@ public function execute(Observer $observer) */ protected function collectOrderAttributeMetaData(Order $order) { - $metaData = []; - /* @var \Amasty\Orderattr\Model\ResourceModel\Attribute\Collection $attributeCollection */ - $attributeCollection = $this->objectManager->get( - 'Amasty\Orderattr\Model\ResourceModel\Attribute\CollectionFactory')->create(); - $attributeCollection->addFieldToSelect('attribute_code'); - $attributeCollection->addFieldToSelect('frontend_label'); - foreach ($attributeCollection->getData() as $attribute) { - $metaData['order_' . $attribute['attribute_code']] = $order->getData($attribute['attribute_code']); - } - return $metaData; + $metaData = []; + /* @var \Amasty\Orderattr\Model\ResourceModel\Attribute\Collection $attributeCollection */ + $attributeCollection = $this->objectManager->get( + 'Amasty\Orderattr\Model\ResourceModel\Attribute\CollectionFactory')->create(); + $attributeCollection->addFieldToSelect('attribute_code'); + $attributeCollection->addFieldToSelect('frontend_label'); + + $i = 0; + foreach ($attributeCollection->getData() as $attribute) { + if ( is_null($order->getData($attribute['attribute_code'])) || $i >= 25) { + continue; + } + $metaData['order_' . $attribute['attribute_code']] = $order->getData($attribute['attribute_code']); + $i++; + } + return $metaData; } } \ No newline at end of file diff --git a/README.md b/README.md index 75647bc..35d0e3d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This repository contains the Magento 2.2 extension that enables to process payme ## Documentation -* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html) +* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html) ## Support @@ -28,4 +28,4 @@ We do provide special integrations for the following one step checkouts: ## License -Please see the [license file](https://github.com/pfpayments/magento-2.2/blob/2.1.6/LICENSE) for more information. \ No newline at end of file +Please see the [license file](https://github.com/pfpayments/magento-2.2/blob/2.1.7/LICENSE) for more information. \ No newline at end of file diff --git a/composer.json b/composer.json index c5d724a..d834c9d 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } ], "type" : "magento2-module", - "version" : "2.1.6", + "version" : "2.1.7", "require" : { "php": "7.0.2|7.0.4|~7.0.6|~7.1.0|~7.2.0|~8.0|~8.1", "magento/framework" : "^101.0.2", diff --git a/docs/en/documentation.html b/docs/en/documentation.html index ab750f2..7910426 100644 --- a/docs/en/documentation.html +++ b/docs/en/documentation.html @@ -22,7 +22,7 @@

Documentation

  • - + Source
  • diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index b5212ea..ccf4b7d 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -18,7 +18,7 @@ PostFinanceCheckout_Payment::config - documentation.]]> + documentation.]]> diff --git a/etc/config.xml b/etc/config.xml index d9107bb..b0c5d0d 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -14,7 +14,7 @@ - 2.1.6 + 2.1.7 3.2.0 diff --git a/etc/db_schema.xml b/etc/db_schema.xml index cc90b96..441a68b 100644 --- a/etc/db_schema.xml +++ b/etc/db_schema.xml @@ -38,7 +38,7 @@ - + diff --git a/etc/module.xml b/etc/module.xml index 45231b1..bea6652 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -11,7 +11,7 @@ */ --> - + diff --git a/etc/schema.graphqls b/etc/schema.graphqls index 10b965f..c39e22d 100644 --- a/etc/schema.graphqls +++ b/etc/schema.graphqls @@ -2,19 +2,19 @@ type Query { customerOrderTransaction( order_id: String! @doc(description: "Specify the increment id of the order.") integration_type: String! @doc(description: "Sort of integration: 'JAVASCRIPT', 'LIGHTBOX', 'PAYMENTPAGE'.") - ): CustomerOrderTransactionOutput @resolver( class: "\\Wallee\\Payment\\Model\\Resolver\\CustomerOrderTransactionSettings") @doc(description: "Customer order transaction's settings") @cache(cacheable: false) + ): CustomerOrderTransactionOutput @resolver( class: "\\PostFinanceCheckout\\Payment\\Model\\Resolver\\CustomerOrderTransactionSettings") @doc(description: "Customer order transaction's settings") @cache(cacheable: false) } type Mutation { - updateTransactionUrls(input: UpdateTransactionUrlsInput!): UpdateTransactionUrlsOutput @resolver( class: "\\Wallee\\Payment\\Model\\Resolver\\UpdateTransactionUrls") @doc(description: "Update transaction urls to redirect the customer after placing the order") - restoreQuote(input: RestoreQuoteInput!): RestoreQuoteOutput @resolver( class: "\\Wallee\\Payment\\Model\\Resolver\\RestoreQuote") @doc(description: "restores a quote if payment fails or is cancelled") + updateTransactionUrls(input: UpdateTransactionUrlsInput!): UpdateTransactionUrlsOutput @resolver( class: "\\PostFinanceCheckout\\Payment\\Model\\Resolver\\UpdateTransactionUrls") @doc(description: "Update transaction urls to redirect the customer after placing the order") + restoreQuote(input: RestoreQuoteInput!): RestoreQuoteOutput @resolver( class: "\\PostFinanceCheckout\\Payment\\Model\\Resolver\\RestoreQuote") @doc(description: "restores a quote if payment fails or is cancelled") } type CustomerOrderTransactionOutput { order_id: Int @doc(description: "Order id") - transaction_id: Int @doc(description: "WhiteLabelMachineName transaction id") - transaction_state: String @doc(description: "WhiteLabelMachineName transaction state") - payment_url: String @doc(description: "WhiteLabelMachineName payment url to integrate external payment") + transaction_id: Int @doc(description: "PostFinanceCheckout transaction id") + transaction_state: String @doc(description: "PostFinanceCheckout transaction state") + payment_url: String @doc(description: "PostFinanceCheckout payment url to integrate external payment") integration_type: String @doc(description: "Integration type") } diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index ef95f4d..3cc43b6 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -50,7 +50,7 @@ "Gift Wrap","Geschenkverpackung" "Hold Delivery","Lieferung halten" "ID required","ID erforderlich" -"If you need help setting up the PostFinance Checkout extension, check out the documentation.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die Dokumentation an." +"If you need help setting up the PostFinance Checkout extension, check out the documentation.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die Dokumentation an." "Inactive","Inaktiv" "Information","Informationen" "Invoice","Rechnung" diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 7ed32a7..73d4e54 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -50,7 +50,7 @@ "Gift Wrap","Gift Wrap" "Hold Delivery","Hold Delivery" "ID required","ID required" -"If you need help setting up the PostFinance Checkout extension, check out the documentation.","If you need help setting up the PostFinance Checkout extension, check out the documentation." +"If you need help setting up the PostFinance Checkout extension, check out the documentation.","If you need help setting up the PostFinance Checkout extension, check out the documentation." "Inactive","Inactive" "Information","Information" "Invoice","Invoice" diff --git a/i18n/fr_CH.csv b/i18n/fr_CH.csv index 8c71cc8..c66a7a0 100644 --- a/i18n/fr_CH.csv +++ b/i18n/fr_CH.csv @@ -50,7 +50,7 @@ "Gift Wrap","Papier cadeau" "Hold Delivery","Suspendre la livraison" "ID required","Pièce d'identité requise" -"If you need help setting up the wallee extension, check out the documentation.","Si vous avez besoin d'aide pour configurer l'extension wallee, consultez la documentation an." +"If you need help setting up the wallee extension, check out the documentation.","Si vous avez besoin d'aide pour configurer l'extension wallee, consultez la documentation an." "Inactive","Inactif" "Information","Information" "Invoice","Facture" diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 8c71cc8..c66a7a0 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -50,7 +50,7 @@ "Gift Wrap","Papier cadeau" "Hold Delivery","Suspendre la livraison" "ID required","Pièce d'identité requise" -"If you need help setting up the wallee extension, check out the documentation.","Si vous avez besoin d'aide pour configurer l'extension wallee, consultez la documentation an." +"If you need help setting up the wallee extension, check out the documentation.","Si vous avez besoin d'aide pour configurer l'extension wallee, consultez la documentation an." "Inactive","Inactif" "Information","Information" "Invoice","Facture" diff --git a/i18n/it_CH.csv b/i18n/it_CH.csv index a48df15..6cd7d97 100644 --- a/i18n/it_CH.csv +++ b/i18n/it_CH.csv @@ -50,7 +50,7 @@ "Gift Wrap","Confezione regalo" "Hold Delivery","Sospendi la consegna" "ID required","ID richiesto" -"If you need help setting up the wallee extension, check out the documentation.","Se hai bisogno di aiuto per configurare l'estensione wallee, consulta la documentazione an." +"If you need help setting up the wallee extension, check out the documentation.","Se hai bisogno di aiuto per configurare l'estensione wallee, consulta la documentazione an." "Inactive","Inattivo" "Information","Informazione" "Invoice","Fattura" diff --git a/i18n/it_IT.csv b/i18n/it_IT.csv index a48df15..6cd7d97 100644 --- a/i18n/it_IT.csv +++ b/i18n/it_IT.csv @@ -50,7 +50,7 @@ "Gift Wrap","Confezione regalo" "Hold Delivery","Sospendi la consegna" "ID required","ID richiesto" -"If you need help setting up the wallee extension, check out the documentation.","Se hai bisogno di aiuto per configurare l'estensione wallee, consulta la documentazione an." +"If you need help setting up the wallee extension, check out the documentation.","Se hai bisogno di aiuto per configurare l'estensione wallee, consulta la documentazione an." "Inactive","Inattivo" "Information","Informazione" "Invoice","Fattura"