Created
March 26, 2015 13:04
-
-
Save tlarevo/d0b3e569f387f64885eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$token = $_POST['stripeToken']; | |
$charge = Stripe_Charge::create( | |
array( | |
// 'customer' => $customer->id, | |
'amount' => $courseFee, | |
'currency' => 'aud', | |
'source' => $token, | |
'description' => '[email protected]', | |
'application_fee' => 123 | |
), | |
array("Stripe-Account" => "acct_15jAbOCMTJOx0RGD") // Users_account_ID | |
); | |
///////////////////////////////////////////////////////////////////// | |
// At front-end | |
<script src="https://checkout.stripe.com/v2/checkout.js" class="stripe-button" | |
data-key="pk_test_8SIvC4XiqnlOUuNJ4qxSVpRH" <!-- This is user's Publishable_key --> | |
data-email= "<?php echo $usremail; ?>" | |
data-amount="<?php echo $valCoursefee*100; ?>" data-description="Pay & Enroll"> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment