-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Interac Refund #627
Conversation
if (chargeId.isNullOrBlank() && paymentIntentId.isNullOrBlank()) { | ||
throw TerminalException( | ||
TerminalException.TerminalErrorCode.INVALID_REQUIRED_PARAMETER, | ||
"You must provide a refund Id." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also throw an error when both charge ID and PaymentIntent ids are set, we should only accept "one of", seems like the case we're using the chargeID here when a user provides both
@@ -652,8 +653,14 @@ class StripeTerminalReactNativeModule(reactContext: ReactApplicationContext) : | |||
@Suppress("unused") | |||
fun collectRefundPaymentMethod(params: ReadableMap, promise: Promise) = | |||
withExceptionResolver(promise) { | |||
val chargeId = requireParam(params.getString("chargeId")) { | |||
"You must provide a chargeId" | |||
val chargeId = params.getString("chargeId") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add these changes for iOS as well?
Summary
Support Interac Refund.
Motivation
Support Interac Refund.
Testing
Documentation
Select one: