Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titlesrc/functions/graphql/providers/payments.ts
Code Block
export interface IPhoneNumberPaymentDetails {
  cc: string;
  phoneNumber: string;
}

export interface IUserPaymentDetails {
  email: string;
  phoneNumber: IPhoneNumberPaymentDetailsstring;
}

export interface ICreatePreAuthPaycometRequest {
  userPaymentDetails: IUserPaymentDetails
}

public async createPreAuthorizationPaycomet({
....
}) {
....
const paycometPreauth = await this.paymentsClient.paycometClient.request<ICreatePreAuthorizationResponse>(
        (apis) =>
          apis.paymentsApi.createPreAuthorization({
            iCreatePreAuthorizationRequest: {
              ...,
              billingAddress,
              user: {
                email,
                phonenumber,
              } 
      },
      region: regionCountry,
    }),
  );
  ...
}

...

Expand
titlepackages/packages/payments/src/services/paycomet/generated/api.ts
Code Block
export interface IPhoneNumberPaymentDetails {
  cc: string;
  phoneNumber: string;
}

export interface IUserPaymentDetails {
  email: string;
  phoneNumber: IPhoneNumberPaymentDetailsstring;
}

export interface ICreatePreAuthPaycometRequest {
  userPaymentDetails: IUserPaymentDetails
}

export interface ICreatePreAuthorizationRequest {
    billingAddress: IBillingAddress,
    userPaymentDetails: IUserPaymentDetails
}

...