@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.
@@ -12742,22 +12742,18 @@ var CheckoutSession = class {
12742
12742
  });
12743
12743
  }
12744
12744
  /**
12745
- * Report a PayPal order's progress from `onApprove` on an experimental PayPal
12746
- * SDK pane: the approval, before asking PayPal to capture — and capture only
12747
- * once the router has it — then the capture PayPal answered, or a decline.
12748
- * When the approval's answer is lost, do not capture: report `NOT_CAPTURED`
12749
- * instead, which releases an approval the router may have recorded.
12750
- *
12751
- * The router records each on the payment and relays a capture that took money
12752
- * to e-Payouts the way e-Payouts' own PayPal page does. It does not mark the
12753
- * payment paid: that happens only on e-Payouts' notification, so poll the
12754
- * payment's status afterwards. A repeated report is answered, not recorded
12755
- * twice.
12756
- *
12757
- * `POST /payment-link/{merchantId}/{paymentId}/epayouts/paypal-capture`
12758
- */
12759
- async epayoutsPaypalCapture(params, options) {
12760
- return this.client.request("POST", `${this.linkBase}/epayouts/paypal-capture`, {
12745
+ * Report PayPal's refusal of the card or the payer on the PayPal Express or
12746
+ * Pay with card pane (for example `INSTRUMENT_DECLINED`, `PAYER_CANNOT_PAY`,
12747
+ * or `AUTHENTICATION_FAILED` for a failed 3-D Secure). The attempt is
12748
+ * recorded declined and the payment stays payable with another card or
12749
+ * method. An issue that is not a refusal, or a payment that no longer awaits
12750
+ * PayPal, is left as it is (`declined: false`). Nothing here captures: the
12751
+ * payment settles from e-Payouts' notification.
12752
+ *
12753
+ * `POST /payment-link/{merchantId}/{paymentId}/epayouts/paypal-decline`
12754
+ */
12755
+ async epayoutsPaypalDecline(params, options) {
12756
+ return this.client.request("POST", `${this.linkBase}/epayouts/paypal-decline`, {
12761
12757
  body: params,
12762
12758
  ...options,
12763
12759
  headers: this.bearerHeaders(options?.headers)
@@ -13119,6 +13115,29 @@ var CheckoutSession = class {
13119
13115
  }
13120
13116
  );
13121
13117
  }
13118
+ /**
13119
+ * Reopen a provider session the buyer switched away from, when they pick the
13120
+ * same method again, instead of opening a second session at the provider
13121
+ * (delopay-todos#401). Pass an `attempt_id` from the checkout's
13122
+ * `reopenable_attempts`; the attempt becomes the payment's active one again
13123
+ * and `redirect_url` sends the buyer back to it. Refused (`IR_16`) when the
13124
+ * payment no longer awaits a method, a payment is under way on the checkout,
13125
+ * or the session can no longer be reopened (settled, lapsed at the provider,
13126
+ * ended by the switch); open a new session as usual then.
13127
+ *
13128
+ * `POST /payments/{paymentId}/reopen-attempt` (publishable key + client secret)
13129
+ */
13130
+ async reopenAttempt(attemptId, options) {
13131
+ return this.client.request(
13132
+ "POST",
13133
+ `/payments/${encodeURIComponent(this.paymentId)}/reopen-attempt`,
13134
+ {
13135
+ body: { client_secret: this.requireClientSecret(), attempt_id: attemptId },
13136
+ ...options,
13137
+ headers: this.pkHeaders(options?.headers)
13138
+ }
13139
+ );
13140
+ }
13122
13141
  /**
13123
13142
  * Payment methods available for this payment.
13124
13143
  *
@@ -13989,4 +14008,4 @@ export {
13989
14008
  decodeNativePanes,
13990
14009
  encodeNativePanes
13991
14010
  };
13992
- //# sourceMappingURL=chunk-PTELZZG3.js.map
14011
+ //# sourceMappingURL=chunk-42VYNDXJ.js.map