Skip to content

[Bug] CardFields type for onApprove callback incorrect #652

Description

@jonty-comp

Library used

paypal-js

🐞 Describe the Bug

The documentation at https://developer.paypal.com/docs/checkout/advanced/customize/3d-secure/sdk/ shows an implementation that handles 3D-Secure liability shift in the onApprove callback, before calling to capture the transaction. This includes a liabilityShift property in the data passed to the callback.

The types definition for CardFields in this library has a CardFieldsOnApproveData type, but it doesn't include this liabilityShift property, so I have to extend manually.

🤔 Expected Behavior

export type CardFieldsOnApproveData = {
orderID: string;
};
should contain a liabilityShift property with the appropriate sub-properties - presumably as per https://developer.paypal.com/docs/checkout/advanced/customize/3d-secure/response-parameters/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions