#battbot

1 messages · Page 1 of 1 (latest)

small knotBOT
bright ibex
#

They payment intent id is pi_3M6lBQJ93KfFVesb19rDdEbU

north hinge
#

hello! taking a look!

bright ibex
#

they saw the green check mark on the reader

#

they were using the payment because the customer forgot to give tips. So they entered an amount of $0.51. The customer entered a tip of $20 on it

north hinge
#

hmmm, can you share your code for collecting payment?

bright ibex
#

what do you mean?

#

we create the payment intent and send it to the reader

#

from what i can see, the reader didn't come back to us with the successful read in order to move to the next step

#

the reader must've gotten the payment intent we sent to it, otherwise it wouldn't even show an amount on it

#

after it reads the card, it's supposed to send us webhook of successful reader action

#

we never got that

#

we are using the server integration

north hinge
#

the code for collecting the PaymentIntent, sending it to the reader, and processing it. And which specific line failed (in your opinion). Omit any sensitive information

bright ibex
#

PaymentIntentCreateParams.Builder builder = PaymentIntentCreateParams.builder();
builder.setCurrency(request.currency).addPaymentMethodType("card_present").addPaymentMethodType("interac_present")
.setCaptureMethod(CaptureMethod.MANUAL).setAmount(request.amount).setOnBehalfOf(request.onBehalfOf).setTransferGroup(request.orderId);

builder.putAllMetadata(request.toMap());
PaymentIntent paymentIntent;
try {
  RequestOptions options = getRequestOptions(request.environment);
  paymentIntent = PaymentIntent.create(builder.build(), options);
  Reader resource = Reader.retrieve(request.terminalId, options);
  resource.processPaymentIntent(ReaderProcessPaymentIntentParams.builder().setPaymentIntent(paymentIntent.getId()).build(), options);
  response.status = PosStripeStatus.IN_PROGRESS;
  response.paymentIntent = paymentIntent.getId();
  PaymentTransaction transaction = PaymentTransaction.generatePaymentTransaction(request, paymentIntent, clientIp, request.transactionId, store);
  paymentTransactionRepository.save(transaction);

} catch (StripeException e) {
  response.status = PosStripeStatus.FAILED;
  response.errorMsg = e.getMessage();
  return response;
}
#

this may be easier to read

#

this is the code that creates the payment intent and sends to the reader. as far as i can tell, the reader got the payment intent

#

there shouldn't be problems with this code, since we've been using it for months processing thousands of transactions

#

From what i can tell, something went wrong between the reader reading the card and communicating with your own servers. Because if it showed successful on the reader, it should've sent back the information to your own server to populate the payment method on the payment intent, but looking at the payment intent right now, it doesn't have that information

north hinge
#

give us a while to look into this

north hinge
#

heya, this is going to require a bit more investigation. Sorry to redirect you, but can you write in to https://support.stripe.com/contact/email with the information and example PaymentIntent that you provided. We'll respond via email/ticket after looking into it further.

bright ibex
#

ok

north hinge
#

let me know once you've written in too