Skip to content

Commit c1d5b79

Browse files
authored
fix(payment): CHECKOUT-000 Fix issue with offsite payment completion (#1786)
1 parent fcc44b3 commit c1d5b79

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/core/src/order-billing-address/order-billing-address-reducer.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,13 @@ describe('orderBillingAddressReducer', () => {
2222
data: action.payload && action.payload.billingAddress,
2323
});
2424
});
25+
26+
it('returns billing address for offsite payment', () => {
27+
const action = createAction(OrderActionType.LoadOrderPaymentsSucceeded, getOrder());
28+
const output = orderBillingAddressReducer(initialState, action);
29+
30+
expect(output).toEqual({
31+
data: action.payload && action.payload.billingAddress,
32+
});
33+
});
2534
});

packages/core/src/order-billing-address/order-billing-address-reducer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function dataReducer(
2424
action: OrderAction,
2525
): OrderBillingAddress | undefined {
2626
switch (action.type) {
27+
case OrderActionType.LoadOrderPaymentsSucceeded:
2728
case OrderActionType.LoadOrderSucceeded:
2829
return replace(data, action.payload && action.payload.billingAddress);
2930

0 commit comments

Comments
 (0)