Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(payment): PAYPAL-3520 Max capture amount failure #2485

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/braintree-integration/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"@typescript-eslint/consistent-type-assertions": "off",
"jest/no-conditional-expect": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-empty-function": "off"
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/no-floating-promises": "off"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const LOADING_INDICATOR_STYLES = {
'background-color': 'rgba(0, 0, 0, 0.4)',
'z-index': '1000',
};
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import {
BraintreeError,
BraintreeFormOptions,
BraintreeThreeDSecureOptions,
} from '@bigcommerce/checkout-sdk/braintree-utils';
import { StandardError } from '@bigcommerce/checkout-sdk/payment-integration-api';

export interface BraintreePaypalPaymentInitializeOptions {
/**
* The CSS selector of a container where the payment widget should be inserted into.
*/
containerId?: string;

threeDSecure?: BraintreeThreeDSecureOptions;

/**
Expand All @@ -18,6 +25,30 @@ export interface BraintreePaypalPaymentInitializeOptions {
* The location to insert the Pay Later Messages.
*/
bannerContainerId?: string;

/**
* A callback right before render Smart Payment Button that gets called when
* Smart Payment Button is eligible. This callback can be used to hide the standard submit button.
*/
onRenderButton?(): void;

/**
* A callback for submitting payment form that gets called
* when buyer approved PayPal account.
*/
submitForm?(): void;

/**
* A callback that gets called if unable to submit payment.
*
* @param error - The error object describing the failure.
*/
onPaymentError?(error: BraintreeError | StandardError): void;

/**
* A callback for displaying error popup. This callback requires error object as parameter.
*/
onError?(error: unknown): void;
}

export interface WithBraintreePaypalPaymentInitializeOptions {
Expand Down
Loading