Versions Compared

Key

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

...

Expand
titlegraphql/resolvers/orders.ts
Code Block
paycometSale = {
  ...,
  userDetailsuserPaymentDetails: {
    email: payment?.paycometInput?.userPaymentDetails?.email || '',
    phoneNumber: payment?.paycometInput?.userPaymentDetails?.phoneNumber || '',
  },
};

...

Expand
titlepackages/apis-psp-service/src/payment.dtos.ts
Code Block
export class PaymentBaseRequestDto extends PaymentBase {
  @IsObject()
  @IsOptional()
  @ApiProperty({
    required: false,
    type: MerchantDataDtoUserPaymentDetails,
    description: "PaymentUser's payment additional information",
  })
  public merchantDatauserPaymentDetails?: MerchantDataDtoUserPaymentDetails;
}

export class MerchantDataDtoUserPaymentDetails {
  @IsObject()
  @IsOptional()
  @ApiProperty({
    required: false,
    type: BillingDataDtoUserPaymentDetails,
    description: "User's billingmobile informationphone",
  })
  public billingmobilePhone?: BillingDataDtostring;
  
  @IsObject()
  @IsOptional()
  @ApiProperty({
    required: false,
    type: BillingDataDtoUserPaymentDetails,
    description: "User's additional informationemail",
  })
  public customer?: CustomerDataDto;
}

export class BillingDataDto {
  //Include the decorators following the pattern
  public billAddrCity;
  public billAddrCountry;
  public billAddrLine1;
  public billAddrPostCode;
  public billAddrState;
}

export class CustomerDataDto {
  //Include the decorators following the pattern
  public mobilePhone?: string;
  public email?: string;
}
Expand
titlepackages/packages/payments/src/services/paycomet/generated/api.ts
Code Block
export interface IUserPaymentDetails {
  email: string;
  phoneNumber: string;
}

export interface ICreatePreAuthPaycometRequest {
  userPaymentDetails: IUserPaymentDetails
}

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

...