Skip to content

Commit

Permalink
Fix surcharge param passing in dev-app and iOS bridge (#853)
Browse files Browse the repository at this point in the history
* dont pass param if empty string

* dont check updatePI to set surchargeNotice;
  • Loading branch information
nazli-stripe authored Nov 14, 2024
1 parent 6bc4073 commit f08d724
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dev-app/src/screens/CollectCardPaymentScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ export default function CollectCardPaymentScreen() {
updatePaymentIntent: enableUpdatePaymentIntent,
enableCustomerCancellation: enableCustomerCancellation,
requestDynamicCurrencyConversion: requestDcc,
surchargeNotice: surchargeNotice,
surchargeNotice: surchargeNotice ? surchargeNotice : undefined,
});

if (error) {
Expand Down
5 changes: 1 addition & 4 deletions ios/StripeTerminalReactNative.swift
Original file line number Diff line number Diff line change
Expand Up @@ -543,10 +543,7 @@ class StripeTerminalReactNative: RCTEventEmitter, DiscoveryDelegate, BluetoothRe
.setUpdatePaymentIntent(updatePaymentIntent)
.setEnableCustomerCancellation(enableCustomerCancellation)
.setRequestDynamicCurrencyConversion(requestDynamicCurrencyConversion)

if updatePaymentIntent, let surchargeNoticeValue = surchargeNotice {
collectConfigBuilder.setSurchargeNotice(surchargeNoticeValue)
}
.setSurchargeNotice(surchargeNotice)

if let eligibleAmount = params["tipEligibleAmount"] as? Int {
do {
Expand Down

0 comments on commit f08d724

Please sign in to comment.