Skip to content
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

Merged
merged 2 commits into from
Feb 27, 2024
Merged

Support Interac Refund #627

merged 2 commits into from
Feb 27, 2024

Conversation

ianlin-bbpos
Copy link
Collaborator

Summary

Support Interac Refund.

Motivation

Support Interac Refund.

Testing

  • I tested this manually
  • I added automated tests

Documentation

Select one:

  • I have added relevant documentation for my changes.
  • This PR does not result in any developer-facing changes.

Comment on lines 659 to 663
if (chargeId.isNullOrBlank() && paymentIntentId.isNullOrBlank()) {
throw TerminalException(
TerminalException.TerminalErrorCode.INVALID_REQUIRED_PARAMETER,
"You must provide a refund Id."
)

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")
Copy link
Collaborator

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?

@nazli-stripe nazli-stripe merged commit 8157de4 into main Feb 27, 2024
2 checks passed
@nazli-stripe nazli-stripe deleted the bbpos/interac-refund-support branch September 6, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants