Skip to content

Commit

Permalink
Remove payment key update in submit additional payment details
Browse files Browse the repository at this point in the history
ISSUE: CS-5413
  • Loading branch information
Tamara committed Nov 27, 2024
1 parent 5fb37dd commit c7e0387
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion extension/src/paymentHandler/sessions-request.handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async function execute(paymentObject) {
const reference = requestBodyJson.reference?.toString()
// ensure the key and new reference is different, otherwise the error with
// "code": "InvalidOperation", "message": "'key' has no changes." will return by commercetools API.
if (reference !== paymentKey)
if (reference && reference !== paymentKey)
actions.push({
action: 'setKey',
key: reference,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
createAddInterfaceInteractionAction,
createSetCustomFieldAction,
createAddTransactionActionByResponse,
getPaymentKeyUpdateAction,
} from './payment-utils.js'
import c from '../config/constants.js'

Expand Down Expand Up @@ -54,11 +53,6 @@ async function execute(paymentObject) {

if (addTransactionAction) actions.push(addTransactionAction)
}
const updatePaymentAction = getPaymentKeyUpdateAction(
paymentObject.key,
request,
)
if (updatePaymentAction) actions.push(updatePaymentAction)
}
return {
actions,
Expand Down

0 comments on commit c7e0387

Please sign in to comment.