Versions Compared

Key

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

...

  • This solution does not include the “browser height/width” information because paycomet did not implement and does not provide access to send this new field.

  • The address fields provided are not optional and are a new request for Visa payments as a way of detecting fraud.

  • The email will be mandatory and telephone number optional, but both will be sent to paycomet.

  • Only the delivery service mode will show the checkbox to use billing address.

  • The “use delivery address” checkbox starts the toggled and the information is pre-filled.

  • This solution is related to Paycomet.

Fields

Before

New Fields Mandatory

Card Number

Name on Card

Expiry

CVV

Address Line 1

(error)

Address Line 2

(error)

Postal Code

(error)

City

(error)

State

(error)

Country

(error)

Email (user data)

(error)

Cellphone (user data)

(error)

(error) - Optional if email is sent

#1 - Create new fields for the new data needed.

...

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
}

...

[Test Cases] Visa/Sibs - new mandatory fields

⚠️ Call-outs

...

This functionality is made exclusively for the PSP Paycomet which is used in the Spanish and Portuguese environments.

🖌️ Figma File

...