Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleCreateSourcePress = async () => {
try {
this.setState({ loading: true, source: null });
const source = await Stripe.createSourceWithParamsAsync({
type: 'alipay',
amount: 50,
currency: 'EUR',
returnURL: Linking.makeUrl('source'),
});
this.setState({ loading: false, source });
} catch (error) {
this.setState({ loading: false });
}
};