@volr/react 0.1.98 → 0.1.99

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.d.cts CHANGED
@@ -879,6 +879,10 @@ interface UseVolrPaymentApiReturn {
879
879
  * Cancel a pending payment
880
880
  */
881
881
  cancelPayment: (paymentId: string) => Promise<PaymentResult>;
882
+ /**
883
+ * Mark a pending payment as failed (before transaction was sent)
884
+ */
885
+ failPendingPayment: (paymentId: string) => Promise<PaymentResult>;
882
886
  /**
883
887
  * Poll payment status until completion
884
888
  */
package/dist/index.d.ts CHANGED
@@ -879,6 +879,10 @@ interface UseVolrPaymentApiReturn {
879
879
  * Cancel a pending payment
880
880
  */
881
881
  cancelPayment: (paymentId: string) => Promise<PaymentResult>;
882
+ /**
883
+ * Mark a pending payment as failed (before transaction was sent)
884
+ */
885
+ failPendingPayment: (paymentId: string) => Promise<PaymentResult>;
882
886
  /**
883
887
  * Poll payment status until completion
884
888
  */
package/dist/index.js CHANGED
@@ -19657,6 +19657,12 @@ function useVolrPaymentApi() {
19657
19657
  },
19658
19658
  [client]
19659
19659
  );
19660
+ const failPendingPayment = useCallback(
19661
+ async (paymentId) => {
19662
+ return client.post(`/payments/${paymentId}/fail`, {});
19663
+ },
19664
+ [client]
19665
+ );
19660
19666
  const pollPaymentStatus = useCallback(
19661
19667
  async (paymentId) => {
19662
19668
  let attempts = 0;
@@ -19678,6 +19684,7 @@ function useVolrPaymentApi() {
19678
19684
  getPaymentHistory,
19679
19685
  updatePaymentToProcessing,
19680
19686
  cancelPayment,
19687
+ failPendingPayment,
19681
19688
  pollPaymentStatus,
19682
19689
  isLoading
19683
19690
  };