#mandalorianiv_error

1 messages · Page 1 of 1 (latest)

polar rivetBOT
#

👋 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/1430891208753942608

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

severe niche
#

I've a problem with input fields, I can not click on it at all on local, I can only can click name on live. I can only enter my credit card number pressing by tab to focus second textfield

brittle hinge
#

👋 Hi there, let me take a look

#

I see your discussion from yesterday about using Card Element, or did you switch to Payment Element?

#

Do you have an example page you can share where I can see this issue?

severe niche
#

tried to but didn't work or I could not implemented it properly

#

my problem actually quite simple, I should be able to click card input field as well

#

selected area is not clickable.

#

I can only enter my name then press the tab works

#

once you tab, both become clickable

polar rivetBOT
proven ivy
severe niche
#

no, I don't

#

it works on your example

proven ivy
#

ok, can you provide a public link to the page where you are having this problem so I can take a look?

severe niche
#

can I show you on screen sharing?

proven ivy
#

we can't do that on this channel, unfortunately

severe niche
#

one sec

proven ivy
#

it's going to be difficult to debug this unless I can try clicking on the Card element on your site myself

#

one thing I'm seeing from your earlier screenshots is it doesn't look like the Card element is loaded in the first one. if it was, you'd see the card icon on the left side of the input

severe niche
#

I've also trying payment element

#

I can see the logs that payment intent is being created but view is not created.

proven ivy
#

what is your code to mount the Card element and how is it being called?

severe niche
#

 if ($paymentMethod->key === 'credit-card') {

           $clientSecret = null;
           $minAmount = 0.0;
           $cartTotal = 0.0;

           try {
            
               $minAmount = 50.0;
              
               $cartTotal = (float) 30;
               $currency = 'eur'; 

        
               \Stripe\Stripe::setApiKey(Config::get("STRIPE_TEST_API_KEY"));

               if ($cartTotal > 0) {
                   $paymentIntent = \Stripe\PaymentIntent::create([
                      'amount'   => (int)($cartTotal * 100), // Cent'e çevir
                      'currency' => $currency,
                      'automatic_payment_methods' => ['enabled' => true],
                   ]);
                   $clientSecret = $paymentIntent->client_secret;
               }

           } catch (\Exception $e) {
               $clientSecret = null; // Hata oluşursa
           }

           $paymentElementContainer = Html::tag('div', '', [
              'id' => 'payment-element-container'
           ]);

           // 2. Hata mesajları için boş div
           $errorMessageContainer = Html::tag('div', '', [
              'id'    => 'payment-message',
              'role'  => 'alert',
              'style' => 'display:none; color: #dc3545; margin-top: 10px;'
           ]);


           $hiddenData = Html::hiddenInput('stripeClientSecret', $clientSecret, ['id' => 'stripeClientSecret']) .
                         Html::hiddenInput('stripeMinAmount', $minAmount, ['id' => 'stripeMinAmount']) .
                         Html::hiddenInput('stripeCartTotal', $cartTotal, ['id' => 'stripeCartTotal']);


           $collapseItem = Html::tag(
              'div',
              $paymentElementContainer . $errorMessageContainer . $hiddenData,
              [
                 'class' => 'card-body payment-methods',
              ]
           );
       }

#

this is how I put it onto website

proven ivy
#

if ($('#payment-element-container').length)

I'm curious about this part, are you checking the length here for a reason? what happens if you remove this conditional?

severe niche
#

Oh wait I've got another error from another .js

#

it might be blocking that

#

I'll let you know one sec

polar rivetBOT
severe niche
#

well I did not call the stripe.js from html side. now it works thanks