Closed sharifashraful closed 1 year ago
@sharifashraful Would you please share your code here so I can review it and help you.
`const connectToLocalMobileReader = async reader => {
//await disconnectReader();
if(!connectedReader) {
const { reader: _connectedReader, error } = await connectLocalMobileReader({
reader,
locationId: reader.locationId || "tml_FH2vHAzk7D4O2W"//reader.locationId,
// onBehalfOf: testAcctId,
});
if (error) {
console.log('connectLocalMobileReader error:', error);
return;
} else {
console.log('Reader connected successfully', _connectedReader);
setConnectedReader(_connectedReader)
}
}
const paymentMethodOptions = {
requestExtendedAuthorization: true,
requestIncrementalAuthorizationSupport: true
};
const {paymentIntent} = await createPaymentIntent({
amount: 100,
currency: 'usd',
onBehalfOf: "acct_1MxqpTCYC35RGLAP",
transferDataDestination: "acct_1MxqpTCYC35RGLAP",
applicationFeeAmount: 20,
paymentMethodTypes: ['card_present'],
paymentMethodOptions: paymentMethodOptions,
capture_method: 'manual'
});
// await setSimulatedCard("4242424242424242")
console.log(paymentIntent)
setDebug(JSON.stringify(paymentIntent))
const {paymentIntent: collectedPaymentIntent} = await collectPaymentMethod({
paymentIntentId: paymentIntent.id,
});
if(!collectedPaymentIntent) {
await cancelCollectPaymentMethod();
// await cancelPaymentIntent()
return;
}
setDebug(JSON.stringify(collectedPaymentIntent))
const {paymentIntent: processedPaymentIntent} = await processPayment(collectedPaymentIntent.id);
console.log(processedPaymentIntent)
setDebug(JSON.stringify(processedPaymentIntent))
}`
@Dhaval1905
Which kind of reader are you use to connect?
@sharifashraful
tap to pay
await discoverReaders({ discoveryMethod: 'localMobile', simulated: false, });
reader info
Also one last thing I want to know that you are user credit or debit card for scan purpose correct?
yes for contactless card
tap to pay
await discoverReaders({ discoveryMethod: 'localMobile', simulated: false, });
reader info
why reader status is offline and id is null??
So may I know your status? Is like you are testing on live mode or test mode. Also share your whole code or github repo where it is live.
@Dhaval1905
real device - reader firing event , but still tap to pay UI not coming.
fixed..
there was conflict between StripeTerminalProvider and StripeProvider
i used like this
<StripeTerminalProvider>
<StripeProvider>
....
...
Describe the bug
i successfully created payment intent by react native terminal sdk. but tap to pay screen does not show when i call
collectPaymentMethod
function.Expected behavior tap to pay screen should display
Screenshots
Stripe Terminal React Native SDK version
"^0.0.1-beta.12",
Smartphone (please complete the following information):