Skip to content

Instantly share code, notes, and snippets.

@bkrausz
Forked from maccman/charge.php
Last active September 24, 2021 17:13
Show Gist options
  • Save bkrausz/a76f9d7a9b446337d470 to your computer and use it in GitHub Desktop.
Save bkrausz/a76f9d7a9b446337d470 to your computer and use it in GitHub Desktop.
Please see https://stripe.com/docs/checkout/php for updated code examples
// Please see https://stripe.com/docs/checkout/php for updated code examples
@JoysonAnto
Copy link

Hi Stripe Bitcoin team,
I need to charge the amount that varies dynamically each time how to manage that data-amount="5000"

 <script
			src="https://checkout.stripe.com/checkout.js" class="stripe-button"
			data-key="<?php echo $stripe_code['publishable_key']; ?>"
			data-amount="<?php echo $price; ?>"
			data-name="OfficeBnb"
			data-description="2 widgets (<?php echo  $this->session->userdata('currency_s').($price); ?>) Cents"
			data-image="images/logo/<?php echo $this->config->item('logo_image');?>"
			data-label="Pay with Card or Bitcoin"
			data-locale="auto"
			data-currency="<?php echo $this->session->userdata('currency_type'); ?>"
			data-bitcoin="true">
		</script>

@terrimorgan
Copy link

Same comment as @Bhlowe back in April ... updates to the examples are overdue.

Same comment as @JoysonAnto needs to be an option to get a variable amount. Can't use this with a store -- unless attached directly to products that can only be purchased individually at a set price.

Same for the Requirement to add "Composer" ..."assumes you’ve installed the Stripe PHP library via Composer. ..." which also assumes quite a bit.

For what is touted as "super simple" the implementation seems to be much more complicated than it should need to be. Granted, I'm not an expert, my skills are ok. For those of us who might want to use Stripe but don't live and breathe code every day the claim of "as little as one line of client side code" is seriously misleading. There's quite a bit more required to implement than "one line of client side code."

@ovvval
Copy link

ovvval commented Aug 10, 2017

This is really awesome. Straight to the point. I love it.

@aldcar2002
Copy link

How can I get the confirmation number or transaction number of the payment ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment