GoSell SDK React Native - Payment Modal Not Dismissing After Callback
Issue Summary
The GoSell SDK's native payment modal does not automatically dismiss after the payment callback fires, causing the app to become frozen/unresponsive. Although the payment completes successfully and JavaScript navigation occurs, the native payment screen remains visible on top of the React Native views, blocking all touch events.
Environment
- Package:
@tap-payments/gosell-sdk-react-native
- Version: 2.3.71 (tested)
- Platform: iOS and Android
- React Native Version: 0.80.0
Steps to Reproduce
- Initiate a payment via the GoSell SDK
- Complete the payment successfully (card processing succeeds)
- Observe the SDK callback fires and returns SUCCESS status
- Expected: Payment modal dismisses, app returns to normal state
- Actual: Modal stays on screen, app becomes frozen and unresponsive
Root Cause
The SDK's session.start() method displays a native payment modal, but there is no automatic dismissal mechanism triggered by the callback. The callback fires and is handled in JavaScript, but the underlying native UIViewController/Activity is never dismissed.
Evidence
From iOS Bridge.swift (ios/Classes/Bridge.swift):
session.start() is called in startPayment() method
session.stop() is available but only triggered by timeout in terminateSession()
- No automatic dismissal occurs when payment callback fires
From Android (RNGosellSdkReactNativeModule.java):
- Similar issue:
startSDK() initiates the payment flow
- No corresponding method to terminate/dismiss the session from JavaScript
Expected Behavior
After the payment callback fires (success, failed, or cancelled), the SDK should either:
- Automatically dismiss the payment modal, OR
- Expose a public method to dismiss/terminate the session from JavaScript
Workaround (Temporary)
We implemented a patch that exposes terminateSession() method to JavaScript:
// Call after SDK callback fires
RNGoSell.goSellSDK.terminateSession();
Patch file: Available upon request
Suggested Fix
- Add automatic dismissal of the payment modal after callback completion
- Alternatively, expose a
terminateSession() / closePayment() method that can be called from JavaScript
- Update documentation to clarify the lifecycle of the SDK session
Related Code
Impact
- Severity: High - App becomes completely unresponsive
- Frequency: 100% reproducible on successful payments
- Platforms Affected: iOS, Android
This issue blocks production usage of the SDK. A workaround has been implemented via patching, but an official fix is needed.
GoSell SDK React Native - Payment Modal Not Dismissing After Callback
Issue Summary
The GoSell SDK's native payment modal does not automatically dismiss after the payment callback fires, causing the app to become frozen/unresponsive. Although the payment completes successfully and JavaScript navigation occurs, the native payment screen remains visible on top of the React Native views, blocking all touch events.
Environment
@tap-payments/gosell-sdk-react-nativeSteps to Reproduce
Root Cause
The SDK's
session.start()method displays a native payment modal, but there is no automatic dismissal mechanism triggered by the callback. The callback fires and is handled in JavaScript, but the underlying native UIViewController/Activity is never dismissed.Evidence
From iOS Bridge.swift (
ios/Classes/Bridge.swift):session.start()is called instartPayment()methodsession.stop()is available but only triggered by timeout interminateSession()From Android (
RNGosellSdkReactNativeModule.java):startSDK()initiates the payment flowExpected Behavior
After the payment callback fires (success, failed, or cancelled), the SDK should either:
Workaround (Temporary)
We implemented a patch that exposes
terminateSession()method to JavaScript:Patch file: Available upon request
Suggested Fix
terminateSession()/closePayment()method that can be called from JavaScriptRelated Code
Impact
This issue blocks production usage of the SDK. A workaround has been implemented via patching, but an official fix is needed.