@@ -33,7 +33,7 @@ export default class WCStripeAPI {
33
33
* Construct WC AJAX endpoint URL.
34
34
*
35
35
* @param {string } endpoint Request endpoint URL.
36
- * @param {string } prefix Endpoint URI prefix (default: 'wc_stripe_').
36
+ * @param {string } prefix Endpoint URI prefix (default: 'wc_stripe_').
37
37
* @return {string } URL with interpolated endpoint.
38
38
*/
39
39
getAjaxUrl ( endpoint , prefix = 'wc_stripe_' ) {
@@ -140,7 +140,7 @@ export default class WCStripeAPI {
140
140
/**
141
141
* Creates an intent based on a payment method.
142
142
*
143
- * @param {number|null } orderId The id of the order if creating the intent on Order Pay page.
143
+ * @param {number|null } orderId The id of the order if creating the intent on Order Pay page.
144
144
* @param {string|null } paymentMethodType The type of payment method.
145
145
*
146
146
* @return {Promise } The final promise for the request to the server.
@@ -172,7 +172,7 @@ export default class WCStripeAPI {
172
172
/**
173
173
* Creates and confirms a setup intent.
174
174
*
175
- * @param {Object } paymentMethod Payment method data.
175
+ * @param {Object } paymentMethod Payment method data.
176
176
* @param {Object } additionalData Additional data to send with the request.
177
177
*
178
178
* @return {Promise } Promise containing the setup intent.
@@ -251,12 +251,12 @@ export default class WCStripeAPI {
251
251
/**
252
252
* Updates a payment intent with data from order: customer, level3 data and and maybe sets the payment for future use.
253
253
*
254
- * @param {string } intentId The id of the payment intent.
255
- * @param {number } orderId The id of the order.
256
- * @param {string } savePaymentMethod 'yes' if saving.
254
+ * @param {string } intentId The id of the payment intent.
255
+ * @param {number } orderId The id of the order.
256
+ * @param {string } savePaymentMethod 'yes' if saving.
257
257
* @param {string } selectedUPEPaymentType The name of the selected UPE payment type or empty string.
258
258
*
259
- * @return {Promise } The final promise for the request to the server .
259
+ * @return {Object|undefined } The response from the server or undefined if the intent is a setup intent .
260
260
*/
261
261
updateIntent (
262
262
intentId ,
@@ -298,7 +298,7 @@ export default class WCStripeAPI {
298
298
* Extracts the details about a payment intent from the redirect URL,
299
299
* and displays the intent confirmation modal (if needed).
300
300
*
301
- * @param {string } redirectUrl The redirect URL, returned from the server.
301
+ * @param {string } redirectUrl The redirect URL, returned from the server.
302
302
* @param {string } paymentMethodToSave The ID of a Payment Method if it should be saved (optional).
303
303
* @return {Object|true } An object containing the redirect URL on success and a flag indicating
304
304
* if the page is the Pay for order page, or `true` if no confirmation is needed.
@@ -385,7 +385,7 @@ export default class WCStripeAPI {
385
385
* Process checkout and update payment intent via AJAX.
386
386
*
387
387
* @param {string } paymentIntentId ID of payment intent to be updated.
388
- * @param {Object } fields Checkout fields.
388
+ * @param {Object } fields Checkout fields.
389
389
* @return {Promise } Promise containing redirect URL for UPE element.
390
390
*/
391
391
processCheckout ( paymentIntentId , fields ) {
@@ -415,7 +415,7 @@ export default class WCStripeAPI {
415
415
* Updates order status, if there is an error while confirming intent.
416
416
*
417
417
* @param {string } intentId The id of the Payment/Setup Intent.
418
- * @param {number } orderId The id of the WC_Order.
418
+ * @param {number } orderId The id of the WC_Order.
419
419
*/
420
420
updateFailedOrder ( intentId , orderId ) {
421
421
this . request ( this . getAjaxUrl ( 'update_failed_order' ) , {
@@ -496,7 +496,7 @@ export default class WCStripeAPI {
496
496
/**
497
497
* Normalizes address fields in WooCommerce supported format.
498
498
*
499
- * @param {Object } billingAddress Billing address.
499
+ * @param {Object } billingAddress Billing address.
500
500
* @param {Object } shippingAddress Shipping address.
501
501
* @return {Promise } Promise for the request to the server.
502
502
*/
@@ -604,7 +604,7 @@ export default class WCStripeAPI {
604
604
/**
605
605
* Empty the cart (legacy version, non-StoreAPI).
606
606
*
607
- * @param {Object } params Parameters.
607
+ * @param {Object } params Parameters.
608
608
* @param {number } params.bookingId Booking ID.
609
609
* @return {Promise } Promise for the request to the server.
610
610
*/
@@ -640,9 +640,9 @@ export default class WCStripeAPI {
640
640
/**
641
641
* Pays for an order based on the Express Checkout payment method.
642
642
*
643
- * @param {number } order The order ID.
643
+ * @param {number } order The order ID.
644
644
* @param {Object } orderDetails Order details, including order key and billing email.
645
- * @param {Object } paymentData Order data.
645
+ * @param {Object } paymentData Order data.
646
646
* @return {Promise } Promise for the request to the server.
647
647
*/
648
648
expressCheckoutECEPayForOrder ( order , orderDetails , paymentData ) {
@@ -657,8 +657,8 @@ export default class WCStripeAPI {
657
657
/**
658
658
* Posts data to the Blocks API.
659
659
*
660
- * @param {string } path The path to post to.
661
- * @param {Object } data The data to post.
660
+ * @param {string } path The path to post to.
661
+ * @param {Object } data The data to post.
662
662
* @param {Object } headers The headers for the request.
663
663
* @return {Promise } The promise for the request to the server.
664
664
*/
0 commit comments