Fix postback handling.

This commit is contained in:
Patrick Fic
2023-08-16 15:28:05 -07:00
parent c10517a11b
commit a879e99e77
4 changed files with 15 additions and 11 deletions

View File

@@ -97,16 +97,12 @@ const CardPaymentModalComponent = ({
};
const handleFinish = async (values) => {
console.log(
"🚀 ~ file: card-payment-modal.component..jsx:100 ~ handleFinish ~ values:",
values
);
try {
const paymentResult = await insertPayment({
variables: {
paymentInput: {
amount: values.amount,
transactionid: values.paymentResponse.paymentid,
transactionid: (values.paymentResponse.paymentid || "").toString(),
payer: t("payments.labels.customer"),
type: values.paymentResponse.cardbrand,
jobid: values.jobid,

View File

@@ -177,6 +177,7 @@ export function JobPayments({
bodyshop,
amount: balance.getAmount(),
account: job.ro_number,
invoice: job.id,
}
);
setGeneratingtURL(false);
@@ -209,7 +210,7 @@ export function JobPayments({
>
{t("menus.header.enterpayment")}
</Button>
<Button
onClick={() =>
setCardPaymentContext({