You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Called on button click to set up a one-time payment. [createOrder docs](https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-reference/#createorder).
211
290
*/
212
-
createOrder?: (
213
-
data: CreateOrderData,
214
-
actions: CreateOrderActions,
215
-
)=>Promise<string>;
291
+
createOrder?: PayPalButtonCreateOrder;
216
292
/**
217
293
* Called on button click to set up a recurring payment. [createSubscription docs](https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-reference/#createsubscription).
* Save payment methods to charge payers after a set amount of time. For example, you can offer a free trial and charge payers after the trial expires. Payers don't need to be present when charged. No checkout required.
* Learn more about [configuring the funding source for standalone buttons](https://developer.paypal.com/docs/business/checkout/configure-payments/standalone-buttons/#4-funding-sources).
231
304
*/
232
-
fundingSource?: FUNDING_SOURCE;
305
+
fundingSource?: PayPalButtonFundingSource;
233
306
/**
234
307
* Called when finalizing the transaction. Often used to inform the buyer that the transaction is complete. [onApprove docs](https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-reference/#onapprove).
235
308
*/
236
-
onApprove?: (
237
-
data: OnApproveData,
238
-
actions: OnApproveActions,
239
-
)=>Promise<void>;
309
+
onApprove?: PayPalButtonOnApprove;
240
310
/**
241
311
* Called when the buyer cancels the transaction.
242
312
* Often used to show the buyer a [cancellation page](https://developer.paypal.com/docs/business/checkout/add-capabilities/buyer-experience/#3-show-cancellation-page).
243
313
*/
244
-
onCancel?: (
245
-
data: Record<string,unknown>,
246
-
actions: OnCancelledActions,
247
-
)=>void;
314
+
onCancel?: PayPalButtonOnCancel;
248
315
/**
249
316
* Called when the button is clicked. Often used for [validation](https://developer.paypal.com/docs/checkout/integration-features/validation/).
250
317
*/
251
-
onClick?: (
252
-
data: Record<string,unknown>,
253
-
actions: OnClickActions,
254
-
)=>Promise<void>|void;
318
+
onClick?: PayPalButtonOnClick;
255
319
/**
256
320
* Catch all for errors preventing buyer checkout.
257
321
* Often used to show the buyer an [error page](https://developer.paypal.com/docs/checkout/integration-features/handle-errors/).
258
322
*/
259
-
onError?: (err: Record<string,unknown>)=>void;
323
+
onError?: PayPalButtonOnError;
260
324
/**
261
325
* Called when the buttons are initialized. The component is initialized after the iframe has successfully loaded.
* [Styling options](https://developer.paypal.com/docs/business/checkout/reference/style-guide/#customize-the-payment-buttons) for customizing the button appearance.
288
343
*/
289
-
style?: {
290
-
borderRadius?: number;
291
-
color?: "gold"|"blue"|"silver"|"white"|"black";
292
-
disableMaxWidth?: boolean;
293
-
height?: number;
294
-
label?:
295
-
|"paypal"
296
-
|"checkout"
297
-
|"buynow"
298
-
|"pay"
299
-
|"installment"
300
-
|"subscribe"
301
-
|"donate";
302
-
layout?: "vertical"|"horizontal";
303
-
shape?: "rect"|"pill"|"sharp";
304
-
tagline?: boolean;
305
-
};
344
+
style?: PayPalButtonStyle;
306
345
/**
307
346
* Used for displaying only vaultable buttons.
308
347
*/
309
-
displayOnly?: DisplayOnlyOptions[];
348
+
displayOnly?: PayPalButtonDisplayOnly;
310
349
/**
311
350
* [Message options](https://developer.paypal.com/sdk/js/reference/#message) for customizing the message appearance and limited content control.
0 commit comments