Skip to content

Instantly share code, notes, and snippets.

@briancollins
Created September 12, 2013 13:31
Show Gist options
  • Save briancollins/6537363 to your computer and use it in GitHub Desktop.
Save briancollins/6537363 to your computer and use it in GitHub Desktop.
$customer = Stripe_Customer::retrieve('cus_123');
$customer->card = $_POST['stripeToken'];
try {
$customer->save();
echo 'Card successfully updated!';
} catch (Stripe_CardError $e) {
echo 'Card declined. Please try again';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment