From 4126dbed8fbe6352aefad3a0fd7d1a58fef9b9d9 Mon Sep 17 00:00:00 2001 From: benkwash Date: Tue, 17 Feb 2026 22:05:02 +0000 Subject: [PATCH] feat(RNPSW): add resume transaction functionality and validation updates --- README.md | 41 ++++++++++- __tests__/index.test.tsx | 58 ++++++++++++++-- development/PaystackProvider.tsx | 14 ++-- development/types.ts | 48 +++++++++++-- development/utils.ts | 115 ++++++++++++++++++++++--------- 5 files changed, 229 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 5593dcd..7af7a4d 100644 --- a/README.md +++ b/README.md @@ -102,11 +102,38 @@ const Checkout = () => { }; ``` +### Resume transaction +

The resume transaction flow allows you to initiate a transaction on your server and complete it in the app. This flow provides both the security of server initialization and the convenience of the user experience in the app. +

+ +```tsx +import React from 'react'; +import { Button } from 'react-native'; +import { usePaystack } from 'react-native-paystack-webview'; + +const ResumeTransaction = () => { + const { popup } = usePaystack(); + + const resumePayment = () => { + popup.resumeTransaction({ + accessCode: 'ACCESS_CODE_FROM_PAYSTACK', + onSuccess: (res) => console.log('Payment resumed successfully:', res), + onCancel: () => console.log('User cancelled'), + onLoad: (res) => console.log('WebView Loaded:', res), + onError: (err) => console.log('WebView Error:', err) + }); + }; + + return