Skip to content

Commit

Permalink
[ECP-8452] Updated giftcard amount to transaction limit
Browse files Browse the repository at this point in the history
  • Loading branch information
sushmita committed Aug 4, 2023
1 parent f05ff04 commit ddf8130
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Resources/app/storefront/src/cart/cart.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,7 @@ export default class CartPlugin extends Plugin {
reject(response.resultCode);
} else {
// 0. compare balance to total amount to be paid
if (response.transactionLimit) {
const consumableBalance = parseFloat(response.transactionLimit.value);
} else {
const consumableBalance = parseFloat(response.balance.value);
}

const consumableBalance = response.transactionLimit ? parseFloat(response.transactionLimit.value) : parseFloat(response.balance.value);
let remainingGiftcardBalanceMinorUnits = (consumableBalance - adyenGiftcardsConfiguration.totalInMinorUnits);
if (consumableBalance >= adyenGiftcardsConfiguration.totalInMinorUnits) {
this.remainingGiftcardBalance = (remainingGiftcardBalanceMinorUnits / this.minorUnitsQuotient).toFixed(2);
Expand Down

0 comments on commit ddf8130

Please sign in to comment.