Skip to content

Commit

Permalink
Code cleanup; Updated changelog; Bumped version to 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Young committed Apr 6, 2014
1 parent 8b4eb51 commit 027c5a8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
4 changes: 4 additions & 0 deletions stripe-checkout/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ See the official [Stripe checkout documentation](https://stripe.com/docs/checkou

== Changelog ==

= 1.0.1 =

* Fixed bug where customers would not receive an email receipt after purchase.

= 1.0.0 =

* Initial release.
2 changes: 1 addition & 1 deletion stripe-checkout/class-stripe-checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Stripe_Checkout {
*
* @var string
*/
protected $version = '1.0.0';
protected $version = '1.0.1';

/**
* Unique identifier for your plugin.
Expand Down
17 changes: 2 additions & 15 deletions stripe-checkout/includes/misc-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,18 @@ function sc_charge_card() {
// Set your secret key: remember to change this to your live secret key in production
Stripe::setApiKey( $key );

//echo '<pre>' . print_r( Stripe_Customer::all(), true ) . '</pre>';


// Create new customer
$new_customer = Stripe_Customer::create( array(
'email' => $_POST['stripeEmail'],
'card' => $token,
'description' => 'Created from Stripe testing page at: ' . get_bloginfo( 'title' )
));

// Get the new customer default card
//$customer = Stripe_Customer::retrieve( $new_customer['id'] );


//$default_card = $customer['default_card'];


// Create the charge on Stripe's servers - this will charge the user's card
// Create the charge on Stripe's servers - this will charge the user's default card
try {
$charge = Stripe_Charge::create( array(
'amount' => $amount, // amount in cents, again
'currency' => 'usd',
//'card' => $default_card,
'customer' => $new_customer['id'],
'description' => $description
)
Expand All @@ -82,9 +71,7 @@ function sc_charge_card() {


if( ! $failed ) {




// Update our payment details option so we can show it at the top of the content
$sc_payment_details['show'] = 1;
$sc_payment_details['amount'] = $amount;
Expand Down
2 changes: 1 addition & 1 deletion stripe-checkout/stripe-checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Plugin Name: Simple Stripe Checkout
* Plugin URI: http://philderksen.com/stripe-checkout-wordpress/
* Description: Add a simple Stripe Checkout button and overlay to your site using a shortcode.
* Version: 1.0.0
* Version: 1.0.1
* Author: Phil Derksen
* Author URI: http://philderksen.com
* License: GPL-2.0+
Expand Down

0 comments on commit 027c5a8

Please sign in to comment.