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

Add captureMethod to createPaymentIntent #447

Merged
merged 17 commits into from
Mar 15, 2023

Conversation

billfinn-stripe
Copy link
Collaborator

Summary

Build on top of #443 to support captureMethod for iOS and Android and in the
dev and example apps.

Tested example-app using yalc:

yarn global add yalc
yalc publish
cd example-app
yalc add @stripe/stripe-terminal-react-native

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.

mihaildu and others added 17 commits March 13, 2023 10:16
Attempt to fix build errors like:

> Could not configure Apple Service authentication: 2FA session saved
> in Bitrise Developer Connection is expired, was valid until 2023-03-12
> 21:32:16 +0000 UTC (exit code: 1)

https://app.bitrise.io/build/0565de0f-1eef-4d6c-a660-b6c5c709b6f4
It's not used yet, but this brings the example-app up-to-date with our
dev-app.
Match our dev app and other example apps.
Our example-app is pinned to the currently released version of the RN
SDK. So, we can't make these changes yet.
Comment on lines +465 to +484
<List bolded={false} topSpacing={false} title="CAPTURE METHOD">
<Picker
selectedValue={inputValues?.captureMethod}
style={styles.picker}
itemStyle={styles.pickerItem}
testID="select-capture-method-picker"
onValueChange={(value) =>
setInputValues((state) => ({ ...state, captureMethod: value }))
}
>
{CAPTURE_METHODS.map((a) => (
<Picker.Item
key={a.value}
label={a.label}
testID={a.value}
value={a.value}
/>
))}
</Picker>
</List>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignorable consistency nit: the native example apps use a "Automatic capture" switch instead of a picker...but thinking more about this I think I prefer the picker since it clarifies its an enum and just happens to have two options. So maybe my consistency nit should be to update the native example apps 🤷‍♂️

@@ -49,7 +49,7 @@ export default function CollectCardPaymentScreen() {
});
const [testCardNumber, setTestCardNumber] = useState('4242424242424242');
const [enableInterac, setEnableInterac] = useState(false);
const [skipTipping, setSkipTipping] = useState(true);
const [skipTipping, setSkipTipping] = useState(false);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 good catch

@billfinn-stripe billfinn-stripe merged commit 252dcdc into main Mar 15, 2023
@billfinn-stripe billfinn-stripe deleted the billfinn/add-capture-method-ios branch March 15, 2023 17:43
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