Skip to content

Commit

Permalink
Merge pull request #166 from commercetools/juanjcamposct/added-missin…
Browse files Browse the repository at this point in the history
…g-field-invoice-payload

Added missing paymentOutcome field in invoice payload
  • Loading branch information
praveenkumarct authored Apr 10, 2024
2 parents 6c32f40 + b0d075d commit 057d8b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion enabler/src/components/payment-methods/invoice/invoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import {BaseComponent, BaseOptions} from '../../base';
import styles from '../../../style/style.module.scss';
import buttonStyles from "../../../style/button.module.scss";
import { PaymentOutcome } from '../../../dtos/mock-payment.dto';

export class InvoiceBuilder implements PaymentComponentBuilder {
public componentHasSubmit = true
Expand Down Expand Up @@ -41,7 +42,8 @@ export class Invoice extends BaseComponent {
this.sdk.init({ environment: this.environment });
try {
const requestData = {
paymentMethod: this.paymentMethod
paymentMethod: this.paymentMethod,
paymentOutcome: PaymentOutcome.AUTHORIZED,
};
const response = await fetch(this.processorUrl + '/payments', {
method: 'POST',
Expand Down

0 comments on commit 057d8b0

Please sign in to comment.