@delopay/sdk 0.271.0 → 0.272.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -13020,22 +13020,18 @@ var CheckoutSession = class {
13020
13020
  });
13021
13021
  }
13022
13022
  /**
13023
- * Report a PayPal order's progress from `onApprove` on an experimental PayPal
13024
- * SDK pane: the approval, before asking PayPal to capture — and capture only
13025
- * once the router has it — then the capture PayPal answered, or a decline.
13026
- * When the approval's answer is lost, do not capture: report `NOT_CAPTURED`
13027
- * instead, which releases an approval the router may have recorded.
13028
- *
13029
- * The router records each on the payment and relays a capture that took money
13030
- * to e-Payouts the way e-Payouts' own PayPal page does. It does not mark the
13031
- * payment paid: that happens only on e-Payouts' notification, so poll the
13032
- * payment's status afterwards. A repeated report is answered, not recorded
13033
- * twice.
13034
- *
13035
- * `POST /payment-link/{merchantId}/{paymentId}/epayouts/paypal-capture`
13036
- */
13037
- async epayoutsPaypalCapture(params, options) {
13038
- return this.client.request("POST", `${this.linkBase}/epayouts/paypal-capture`, {
13023
+ * Report PayPal's refusal of the card or the payer on the PayPal Express or
13024
+ * Pay with card pane (for example `INSTRUMENT_DECLINED`, `PAYER_CANNOT_PAY`,
13025
+ * or `AUTHENTICATION_FAILED` for a failed 3-D Secure). The attempt is
13026
+ * recorded declined and the payment stays payable with another card or
13027
+ * method. An issue that is not a refusal, or a payment that no longer awaits
13028
+ * PayPal, is left as it is (`declined: false`). Nothing here captures: the
13029
+ * payment settles from e-Payouts' notification.
13030
+ *
13031
+ * `POST /payment-link/{merchantId}/{paymentId}/epayouts/paypal-decline`
13032
+ */
13033
+ async epayoutsPaypalDecline(params, options) {
13034
+ return this.client.request("POST", `${this.linkBase}/epayouts/paypal-decline`, {
13039
13035
  body: params,
13040
13036
  ...options,
13041
13037
  headers: this.bearerHeaders(options?.headers)
@@ -13397,6 +13393,29 @@ var CheckoutSession = class {
13397
13393
  }
13398
13394
  );
13399
13395
  }
13396
+ /**
13397
+ * Reopen a provider session the buyer switched away from, when they pick the
13398
+ * same method again, instead of opening a second session at the provider
13399
+ * (delopay-todos#401). Pass an `attempt_id` from the checkout's
13400
+ * `reopenable_attempts`; the attempt becomes the payment's active one again
13401
+ * and `redirect_url` sends the buyer back to it. Refused (`IR_16`) when the
13402
+ * payment no longer awaits a method, a payment is under way on the checkout,
13403
+ * or the session can no longer be reopened (settled, lapsed at the provider,
13404
+ * ended by the switch); open a new session as usual then.
13405
+ *
13406
+ * `POST /payments/{paymentId}/reopen-attempt` (publishable key + client secret)
13407
+ */
13408
+ async reopenAttempt(attemptId, options) {
13409
+ return this.client.request(
13410
+ "POST",
13411
+ `/payments/${encodeURIComponent(this.paymentId)}/reopen-attempt`,
13412
+ {
13413
+ body: { client_secret: this.requireClientSecret(), attempt_id: attemptId },
13414
+ ...options,
13415
+ headers: this.pkHeaders(options?.headers)
13416
+ }
13417
+ );
13418
+ }
13400
13419
  /**
13401
13420
  * Payment methods available for this payment.
13402
13421
  *