Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Release 2.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Oct 30, 2023
1 parent 4f2fab0 commit 7a41cf4
Show file tree
Hide file tree
Showing 18 changed files with 40 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Block/Method/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
/**
Expand Down
2 changes: 2 additions & 0 deletions Model/Service/Order/TransactionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Model/Webhook/Listener/Transaction/AuthorizedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.'));
}
Expand Down
26 changes: 16 additions & 10 deletions Observer/CollectOrderAttributeMetaData.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Please see the [license file](https://github.com/pfpayments/magento-2.2/blob/2.1.7/LICENSE) for more information.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/pfpayments/magento-2.2/releases/tag/2.1.6/">
<a href="https://github.com/pfpayments/magento-2.2/releases/tag/2.1.7/">
Source
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<resource>PostFinanceCheckout_Payment::config</resource>
<group id="information" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Information</label>
<comment><![CDATA[If you need help setting up the PostFinance Checkout extension, check out the <a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html" target="_blank">documentation</a>.]]></comment>
<comment><![CDATA[If you need help setting up the PostFinance Checkout extension, check out the <a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html" target="_blank">documentation</a>.]]></comment>
<field id="version" translate="label" type="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Module Version</label>
</field>
Expand Down
2 changes: 1 addition & 1 deletion etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<default>
<postfinancecheckout_payment>
<information>
<version>2.1.6</version>
<version>2.1.7</version>
<sdk_version>3.2.0</sdk_version>
</information>
<general>
Expand Down
2 changes: 1 addition & 1 deletion etc/db_schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<column xsi:type="text" name="language" nullable="false" comment="Language"/>
<column xsi:type="text" name="currency" nullable="false" comment="Currency"/>
<column xsi:type="timestamp" name="created_at" on_update="false" nullable="true" default="CURRENT_TIMESTAMP" comment="Created At"/>
<column xsi:type="int" name="authorization_amount" unsigned="false" nullable="false" comment="Authorization Amount"/>
<column xsi:type="decimal" name="authorization_amount" scale="4" precision="20" unsigned="false" nullable="false" comment="Authorization Amount"/>
<column xsi:type="text" name="image" nullable="true" comment="Image"/>
<column xsi:type="longtext" name="labels" nullable="true" comment="Labels"/>
<column xsi:type="longtext" name="failure_reason" nullable="true" comment="Failure Reason"/>
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="PostFinanceCheckout_Payment" setup_version="2.1.6">
<module name="PostFinanceCheckout_Payment" setup_version="2.1.7">
<sequence>
<module name="Magento_Sales"/>
<module name="Magento_Payment"/>
Expand Down
12 changes: 6 additions & 6 deletions etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down
2 changes: 1 addition & 1 deletion i18n/de_DE.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
"Inactive","Inaktiv"
"Information","Informationen"
"Invoice","Rechnung"
Expand Down
2 changes: 1 addition & 1 deletion i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html"" target=""_blank"">documentation</a>.","If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html"" target=""_blank"">documentation</a>."
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html"" target=""_blank"">documentation</a>.","If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html"" target=""_blank"">documentation</a>."
"Inactive","Inactive"
"Information","Information"
"Invoice","Invoice"
Expand Down
2 changes: 1 addition & 1 deletion i18n/fr_CH.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Si vous avez besoin d'aide pour configurer l'extension wallee, consultez la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Si vous avez besoin d'aide pour configurer l'extension wallee, consultez la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
"Inactive","Inactif"
"Information","Information"
"Invoice","Facture"
Expand Down
2 changes: 1 addition & 1 deletion i18n/fr_FR.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Si vous avez besoin d'aide pour configurer l'extension wallee, consultez la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Si vous avez besoin d'aide pour configurer l'extension wallee, consultez la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
"Inactive","Inactif"
"Information","Information"
"Invoice","Facture"
Expand Down
2 changes: 1 addition & 1 deletion i18n/it_CH.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Se hai bisogno di aiuto per configurare l'estensione wallee, consulta la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html"" target=""_blank"">documentazione</a> an."
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Se hai bisogno di aiuto per configurare l'estensione wallee, consulta la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html"" target=""_blank"">documentazione</a> an."
"Inactive","Inattivo"
"Information","Informazione"
"Invoice","Fattura"
Expand Down
2 changes: 1 addition & 1 deletion i18n/it_IT.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Se hai bisogno di aiuto per configurare l'estensione wallee, consulta la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.6/docs/en/documentation.html"" target=""_blank"">documentazione</a> an."
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Se hai bisogno di aiuto per configurare l'estensione wallee, consulta la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2.2/2.1.7/docs/en/documentation.html"" target=""_blank"">documentazione</a> an."
"Inactive","Inattivo"
"Information","Informazione"
"Invoice","Fattura"
Expand Down

0 comments on commit 7a41cf4

Please sign in to comment.