Skip to content

Commit

Permalink
fix: missing voucher in the payload
Browse files Browse the repository at this point in the history
  • Loading branch information
kiremitrov123 committed Mar 29, 2023
1 parent 205d4a6 commit ba8cf5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Payment/Payment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const Payment = ({
<p>
<strong>{transaction.offerTitle}</strong> <br />
{t('user:payment.price_payed_with', {
price: formatPrice(parseInt(transaction.transactionPriceInclTax), transaction.transactionCurrency, transaction.customerCountry),
price: formatPrice(parseFloat(transaction.transactionPriceInclTax), transaction.transactionCurrency, transaction.customerCountry),
method: transaction.paymentMethod,
})}
</p>
Expand Down
4 changes: 2 additions & 2 deletions src/components/PaymentForm/PaymentForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ const PaymentForm: React.FC<Props> = ({ couponCode, setUpdatingOrder }) => {
const { intervalCheckAccess } = useCheckAccess();

const paymentData = useForm(
{ couponCode, cardholderName: '', cardNumber: '', cardExpiry: '', cardCVC: '', cardExpMonth: '', cardExpYear: '' },
{ cardholderName: '', cardNumber: '', cardExpiry: '', cardCVC: '', cardExpMonth: '', cardExpYear: '' },
async () => {
setUpdatingOrder(true);
await directPostCardPayment(paymentData.values);
await directPostCardPayment({ couponCode, ...paymentData.values });
intervalCheckAccess({ interval: 15000 });
},
object().shape({
Expand Down

0 comments on commit ba8cf5b

Please sign in to comment.