#kamal_subscription-php

1 messages ยท Page 1 of 1 (latest)

umbral salmonBOT
lunar iceBOT
#

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.

umbral salmonBOT
#

๐Ÿ‘‹ 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/1238550691409297450

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

fervent orbit
#

no

topaz cypress
fervent orbit
#

My code is working for cards only but apple pay and goolge pay is not showing and when i added a new code with another way then one time payment is working but subscrption not working

topaz cypress
#
  1. Can you stick to one question at a time
  2. What exact code have you used?
fervent orbit
#

oksy sure
i used payment code in php and it works but not showing apple pay and goolge pay

topaz cypress
#

What code?

#

Can you link to a doc?

fervent orbit
#

let me share code

#

<form class="b-form-panel__form js-animate-in h-animate-in-fade" action="#"
method="POST" id="payment-form">
<input type="hidden" name="name" id="name" value="<?php echo $name; ?>">
<input type="hidden" name="email" id="email" value="<?php echo $gocardless_email; ?>">
<input type="hidden" name="data" id="mdata" value="<?php echo $_GET['data']; ?>">

<!-- <div class="js-booking-form__message"></div> -->

                <div class="b-form-panel__field">
                            <div class="b-form-panel__direct-debit">
                                <div class="b-form-panel__direct-debit__top">
                                    <div>Payments are protected by <strong>Stripe</strong></div>
                                    <div>
                                        <img height="50"
                                                               src="/wp-content/uploads/2024/02/stripe.svg" alt="Stripe Payments">
                                    </div>
                                </div>
                                 <!-- <div id="payment-request-button"></div> -->
                                 <div id="card-element" class="my-card-element"></div>
                                
                                </div>
                                <label class="is-invalid" id="card-errors">
                                    </label>
                            </div>
                        
                        <button type="submit" id="submit-button" class="e-btn" title="Sign Up">Pay Now</button>

                                

                            

                        


                    

                    </form>
topaz cypress
#
  1. For Apple & Google Pay, have you turned them on in your Stripe dashboard? Have you registered domains for them?
fervent orbit
#

yes

#

with another code its working but then subscription not woking

topaz cypress
#

with another code its working but then subscription not woking
Sorry but this doesn't make any sense to me

#

What is not working? The subscription creation? Saving the payment method?

fervent orbit
topaz cypress
#

If you cannot share your relevant code, I cannot help you

fervent orbit
#

let me share all files

topaz cypress
#

No, do not do that

#

I will not review them

fervent orbit
#

okay so let me tell you flow

topaz cypress
fervent orbit
#

first i create the customer and then i chage one time payment and it works but when subscription it shows payment peneing

topaz cypress
#

How are you creating the subscription?

fervent orbit
#

I creted a product in stripe

#

try {
$trial_end = strtotime('2024-09-01');
$subscription = \Stripe\Subscription::create([
'customer' => $customer_id,
'items' => [[
'price' => 'price_1Omme0FLqEmCnbAqB9lkGFXl',
]],
'payment_behavior' => 'default_incomplete',
'trial_end' => $trial_end,
'billing_cycle_anchor' => $trial_end,
'proration_behavior' => 'create_prorations',
]);
}catch(Exception $e) {
$output = $e->getMessage();
}
echo json_encode($output);

#

i think its working

topaz cypress
#

That is a subscription. It appears to include a free trial

fervent orbit
#

yes the subscrption start from sept

umbral salmonBOT
topaz cypress
#

You still did not provide the code you use to create a subscription. Without clear code examples we cannot offer much advice.

fervent orbit
#

i think its working now

#

Thanks for help if i need any help i will ping again

topaz cypress
#

Okay. Sounds good