#reconninja_api

1 messages ¡ Page 1 of 1 (latest)

jagged condorBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1313008576398229515

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

drifting sequoia
#

Here is the bit of code giving issues

#

//Send the transaction to the terminal
try {

            $stripe->terminal->readers->processPaymentIntent(
                $term['stripeID'],
                ['payment_intent' => $intent->id]
            );
            $stripe->terminal->readers->setReaderDisplay(
                $term['stripeID'],
                [
                    'type'    =>    'cart',
                    'cart'    =>    [
                        'currency'        =>    'cad',
                        'line_items'    =>    [
                            [
                                'amount'        =>    $total,
                                'quantity'        =>    $numTickets,
                                'description'    =>    'Raffle Ticket',
                            ],
                        ],
                        'total'            =>    $total,
                    ],
                ]
            );
            
            
            
            
        } catch (Exception $e) {
#

Terminal is bbpos_wisepos_e

viscid scroll
#

Thanks for the code. You should call setRederDisplay before processPaymentIntent. Why do you call it after processPaymentIntent ?

drifting sequoia
#

Oh, the documentation makes it sound like I should call it after.

viscid scroll
#

Which part of the doc makes you think so? Can you share the link so that I can ask the docs team to improve it?

drifting sequoia
#

So it's meant to be more of showing the customer the active cart before being send to payment

#

Specifically: "To set the line items and total displayed on the reader during a payment, pass line items and total information into the setReaderDisplay method. "

#

The "during a payment" wording made me think it was to show the customer what they're paying for while they present their card