You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I came to a couple of issues using this package:
Error message: "Paypal app switch is missing a returnURLScheme"
this message appears when I click on the Paypal Checkout button.
Possible unhandled Promise Rejection (id: 3)
this message appears when I tap the 'Pay' button or 'Cancel' to dismiss the payment view.
What I'm I doing wrong here?
Please find my implementation below.
I'm using ReactNative 0.25.1
import React, {Component} from 'react';
import {
Text,
View,
Image,
ScrollView,
Animated,
TouchableOpacity,
TouchableHighlight,
StyleSheet
} from 'react-native';
const BTClient = require('react-native-braintree');
export default class EventDetail extends Component {
constructor(props) {
super(props);
this.state = { fadeAnim: new Animated.Value(0), // init opacity 0
};
this.showBTView = this.showBTView.bind(this);
}
componentDidMount(){
Animated.timing( // Uses easing functions
this.state.fadeAnim, // The value to drive
{toValue: 1} // Configuration
).start();
}
showBTView(){
fetch('http://localhost:3000/get_token', {method: "GET"})
.then((response) => response.json())
.then((responseData) => {
const clientToken = responseData.clientToken;
BTClient.setup(clientToken);
BTClient.showPaymentViewController(function(err, nonce) {
//callback after the user completes (or cancels) the flow.
//with the nonce, you can now pass it to your server to create a charge against the user's payment method
fetch('http://localhost:3000/pay', {
method: "POST",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({payment_method_nonce: nonce})
}).done();
});
}).done();
}
render() {
return (
<ScrollView>
<TouchableHighlight onPress= {this.showBTView}>
<View style={{height: 30, flex: 1, backgroundColor: 'red', justifyContent: 'center'}}>
<Text style={{textAlign: 'center',}}>Buy this</Text>
</View>
</TouchableHighlight>
</ScrollView>
);
}
}
When I hit the button which triggers the payment View,
this is what shows in xcode:
2016-06-03 08:26:25.883 AppTemplate[62808:28893357] -canOpenURL: failed for URL: "com.paypal.ppclient.touch.v1://" - error: "This app is not allowed to query for scheme com.paypal.ppclient.touch.v1"
2016-06-03 08:26:25.884 AppTemplate[62808:28893357] -canOpenURL: failed for URL: "com.paypal.ppclient.touch.v2://" - error: "This app is not allowed to query for scheme com.paypal.ppclient.touch.v2"
2016-06-03 08:26:25.884 AppTemplate[62808:28893357] -canOpenURL: failed for URL: "com.venmo.touch.v2://x-callback-url/vzero/auth" - error: "This app is not allowed to query for scheme com.venmo.touch.v2"
Thanks for your help
The text was updated successfully, but these errors were encountered:
I'm hitting this now and it kind of looks like perhaps the one touch setup is required as it's enabled by default on the braintree lib. I don't really want one-touch support as it would increase complexity on my end.
Hi,
I came to a couple of issues using this package:
this message appears when I click on the Paypal Checkout button.
this message appears when I tap the 'Pay' button or 'Cancel' to dismiss the payment view.
What I'm I doing wrong here?
Please find my implementation below.
I'm using ReactNative 0.25.1
When I hit the button which triggers the payment View,
this is what shows in xcode:
Thanks for your help
The text was updated successfully, but these errors were encountered: