From b067e8755d73726b885e31289091afc9b62b1a12 Mon Sep 17 00:00:00 2001 From: Martijn Date: Sun, 3 Nov 2024 11:21:22 +0100 Subject: [PATCH] feat(accept-blue): correct refund state --- packages/vendure-plugin-accept-blue/CHANGELOG.md | 4 ++++ packages/vendure-plugin-accept-blue/package.json | 2 +- .../src/api/accept-blue-handler.ts | 8 ++------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/vendure-plugin-accept-blue/CHANGELOG.md b/packages/vendure-plugin-accept-blue/CHANGELOG.md index 0181b0ec..4ef4e370 100644 --- a/packages/vendure-plugin-accept-blue/CHANGELOG.md +++ b/packages/vendure-plugin-accept-blue/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.8.1 (2024-11-03) + +- Bug fix: Return Settled state for successful refunds + # 1.8.0 (2024-11-01) - Implemented refunding via admin UI for initial AC transaction diff --git a/packages/vendure-plugin-accept-blue/package.json b/packages/vendure-plugin-accept-blue/package.json index 6430c0f4..f48d5739 100644 --- a/packages/vendure-plugin-accept-blue/package.json +++ b/packages/vendure-plugin-accept-blue/package.json @@ -1,6 +1,6 @@ { "name": "@pinelab/vendure-plugin-accept-blue", - "version": "1.8.0", + "version": "1.8.1", "description": "Vendure plugin for creating subscriptions with the Accept Blue platform", "author": "Martijn van de Brug ", "homepage": "https://pinelab-plugins.com/", diff --git a/packages/vendure-plugin-accept-blue/src/api/accept-blue-handler.ts b/packages/vendure-plugin-accept-blue/src/api/accept-blue-handler.ts index bbd9a61c..2f0b35d9 100644 --- a/packages/vendure-plugin-accept-blue/src/api/accept-blue-handler.ts +++ b/packages/vendure-plugin-accept-blue/src/api/accept-blue-handler.ts @@ -1,3 +1,4 @@ +import { RefundOrderInput } from '@vendure/common/lib/generated-types'; import { CreatePaymentResult, CreateRefundResult, @@ -6,16 +7,11 @@ import { Logger, Order, Payment, - PaymentMethod, PaymentMethodHandler, RequestContext, SettlePaymentResult, UserInputError, } from '@vendure/core'; -import { - ConfigArg, - RefundOrderInput, -} from '@vendure/common/lib/generated-types'; import { loggerCtx } from '../constants'; import { CheckPaymentMethodInput, @@ -156,7 +152,7 @@ export const acceptBluePaymentHandler = new PaymentMethodHandler({ }; } return { - state: 'Failed', + state: 'Settled', transactionId: String(refundResult.referenceNumber), metadata: refundResult, };