From 50fb5342f408e183b065a0e51687f8ebc09c44d2 Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Tue, 23 Jul 2024 09:52:10 +0700 Subject: [PATCH] Fix docs --- docs/CreatePaymentWithSpecificParams.md | 20 ++++++------------- .../customFields.commercetools.ts | 4 ++++ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/CreatePaymentWithSpecificParams.md b/docs/CreatePaymentWithSpecificParams.md index ef777b9..ac7d8d7 100644 --- a/docs/CreatePaymentWithSpecificParams.md +++ b/docs/CreatePaymentWithSpecificParams.md @@ -9,9 +9,6 @@ Just like [Creating Payment with Credit Card](./CreatePaymentWithCreditCard.md), where the `cardToken` there is a specific params for the method: `creditcard` on Mollie when you are leveraging the Mollie Component to speed up the implementation on your application's Front-end side, Mollie also require some more specific params for the others method which has been pointed out on this [docs](https://docs.mollie.com/reference/extra-payment-parameters) -There are some of them are mandatory when creating payment with that specific methods, such as: applepay, paypal, giftcard, creditcard (when using Mollie Component) -The others can be filled in when the user being redirected to the Checkout URL. -
**Conditions** @@ -29,10 +26,9 @@ Refer to [CreatePayment.md#conditions](./CreatePayment.md#conditions) | `amountPlanned.currencyCode: "EUR"` | `amount.currency: EUR` | YES | | `amountPlanned.centAmount: "1000"` and `amountPlanned.fractionDigits: "2"` | `amount.value: "10.00"` | YES | | `custom.fields.sctm_create_payment_request.redirectUrl: "https://webshop.example.org/order/12345/"` | `redirectUrl: "https://webshop.example.org/order/12345/"` | YES | -| `custom.fields.sctm_create_payment_request.webhookUrl: "https://webshop.example.org/payments/webhook/"` | `redirectUrl: "https://webshop.example.org/payments/webhook/"` | NO | The others params which listed [here](https://docs.mollie.com/reference/create-payment) can be passed through the custom field of the Payment object name **sctm_create_payment_request** with exactly -the same format like those 2 fields ``redirectUrl`` and ``webhookUrl`` above +the same format like the field ``cardToken``
@@ -85,14 +81,10 @@ When create order payment is successfully added on Mollie, we update CommerceToo | Action name (CT) | Value | | -------------------------------- | -------------------------------------------------------------------------- | -| `changeTransactionState` | `createOrderPaymentResponse: , state: 'Pending'` | -| `changeTransactionTimestamp` | `createOrderPaymentResponse: ` | -| `changeTransactionInteractionId` | `transactionId: ` * | -| | `interactionId: ` | -| `addInterfaceInteraction` | `actionType: "CreateOrderPayment"` | -| | `id: ` | -| | `timestamp: ` | -| | `requestValue: {` | -| | `responseValue: ` | +| `changeTransactionState` | `transactionId: , state: 'Pending'` | +| `changeTransactionTimestamp` | `transactionId: , timestamp: ` | +| `changeTransactionInteractionId` | `transactionId: , interactionId: ` | +| `addInterfaceInteraction` | `actionType: "CreatePayment", id: , timestamp: , requestValue: {, responseValue: ` | + \* Actions will always use first `Initial` transaction. There should only be one per payment. Transaction id will be the ID of the transaction which triggered the create payment. \ No newline at end of file diff --git a/processor/src/commercetools/customFields.commercetools.ts b/processor/src/commercetools/customFields.commercetools.ts index 5a36c4d..f295062 100644 --- a/processor/src/commercetools/customFields.commercetools.ts +++ b/processor/src/commercetools/customFields.commercetools.ts @@ -240,6 +240,10 @@ export async function createCustomPaymentTransactionCancelRefundType(): Promise< en: 'SCTM - Payment Cancel Refund on Transaction custom fields', de: 'SCTM - Zahlung stornieren Rückerstattung bei benutzerdefinierten Transaktionsfeldern', }, + description: { + en: 'Showing the reason of cancelling and identifying if the cancel action came from CommerceTools or Mollie', + de: 'Anzeige des Kündigungsgrundes und Identifizierung, ob die Kündigung von CommerceTools oder Mollie erfolgte', + }, resourceTypeIds: ['transaction'], fieldDefinitions: [ {