Skip to content

Commit d82508a

Browse files
committed
W-19728108 Add amount to payment instrument in the basket
1 parent 355bc0d commit d82508a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/template-retail-react-app/app/pages/checkout-one-click/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ const CheckoutOneClick = () => {
157157
const [expirationMonth, expirationYear] = formValue.expiry.split('/')
158158

159159
const paymentInstrument = {
160+
amount: basket?.orderTotal || 0,
160161
paymentMethodId: 'CREDIT_CARD',
161162
paymentCard: {
162163
holder: formValue.holder,

packages/template-retail-react-app/app/pages/checkout-one-click/index.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ describe('Checkout One Click', () => {
205205
rest.post('*/baskets/:basketId/payment-instruments', (req, res, ctx) => {
206206
currentBasket.paymentInstruments = [
207207
{
208-
amount: 0,
208+
amount: 100,
209209
paymentCard: {
210210
cardType: 'Master Card',
211211
creditCardExpired: false,
@@ -1137,6 +1137,7 @@ describe('Checkout One Click', () => {
11371137
const basketWithPayment = JSON.parse(JSON.stringify(scapiBasketWithItem))
11381138
basketWithPayment.paymentInstruments = [
11391139
{
1140+
amount: 100,
11401141
paymentMethodId: 'CREDIT_CARD',
11411142
paymentCard: {
11421143
cardType: 'Visa',
@@ -1153,6 +1154,7 @@ describe('Checkout One Click', () => {
11531154
...scapiOrderResponse,
11541155
paymentInstruments: [
11551156
{
1157+
amount: 100,
11561158
paymentMethodId: 'CREDIT_CARD',
11571159
paymentCard: {
11581160
cardType: 'Visa',
@@ -1233,6 +1235,7 @@ describe('Checkout One Click', () => {
12331235
...scapiOrderResponse,
12341236
paymentInstruments: [
12351237
{
1238+
amount: 100,
12361239
paymentMethodId: 'CREDIT_CARD',
12371240
paymentCard: {
12381241
cardType: 'Visa',

0 commit comments

Comments
 (0)