diff --git a/locale.xml b/locale.xml index 614bf6ac998fbd18e2ce77947aca4916cfaa5a36..2f6f95f4e6660d7d6939654e1a98c3c4a0385cee 100644 --- a/locale.xml +++ b/locale.xml @@ -226,6 +226,12 @@ <en><![CDATA[Transaction number: [orderHash]]]></en> </locale> + <!-- Payment --> + <locale name="history.transaction_id"> + <de><![CDATA[Amazon-Referenznummer: [orderReferenceId]]]></de> + <en><![CDATA[Amazon Reference ID: [orderReferenceId]]]></en> + </locale> + </groups> <groups name="quiqqer/payment-amazon" datatype="js"> diff --git a/src/QUI/ERP/Payments/Amazon/Payment.php b/src/QUI/ERP/Payments/Amazon/Payment.php index 618cf5e77fc77e49f832551fa9a60c39429bc0ad..31f908e61aac0c958212a5d70238ba563bbfebe2 100644 --- a/src/QUI/ERP/Payments/Amazon/Payment.php +++ b/src/QUI/ERP/Payments/Amazon/Payment.php @@ -288,8 +288,6 @@ class Payment extends QUI\ERP\Accounting\Payments\Api\AbstractPayment ) ]); - \QUI\System\Log::writeRecursive($this->getSellerNote($Order)); - $response = $this->getResponseData($Response); $orderReferenceDetails = $response['SetOrderReferenceDetailsResult']['OrderReferenceDetails']; @@ -336,6 +334,15 @@ class Payment extends QUI\ERP\Accounting\Payments\Api\AbstractPayment $this->addAuthorizationReferenceIdToOrder($authorizationReferenceId, $Order); $Order->setPaymentData(self::ATTR_AMAZON_AUTHORIZATION_ID, $amazonAuthorizationId); $Order->setPaymentData(self::ATTR_AMAZON_ORDER_REFERENCE_ID, $orderReferenceId); + $Order->addHistory( + QUI::getLocale()->get( + 'quiqqer/payment-amazon', + 'history.order_reference_id', + [ + 'orderReferenceId' => $orderReferenceId + ] + ) + ); $Order->update(QUI::getUsers()->getSystemUser());