Home Ace in the City Stripe Integration
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
topic

Ace in the City Stripe Integration

Last Updated: March 20, 2020

Some notes about the current state of the stripe integration for Ace in the City. The biggest thing to watch out for right now is the difference between dev and prod. The live keys and test keys need to be manually switched.

We should set this up to be dynamic, but need time scheduled for it.

Below are the files you need to edit.

  • /wp-content/themes/aceinthecity/lib/stripe-config.php
  • /wp-content/themes/aceinthecity/js/scripts-stripe.js

Things to change in stripe-config.php

Inside the conditional statement checking for a subdomain or not, uncomment or comment the correct environment keys.

/* Test Keys */
"secret_key"      => "sk_test_t31EWlOwUBMgA9M1bpq5ak3T",
"publishable_key" => "pk_test_msVvdbCwbclnWFjeVG5mkf7M",

/* Live Keys */
// "secret_key"      => "sk_live_ewZqFkRwz3kcrKNdmcVEaFKb",
// "publishable_key" => "pk_live_y0BgloyZ998GCnupTsoBudyJ",Code language: PHP (php)

Further down you will want to uncomment or comment the correct environment keys for the products.

// Test Product
$productId = 'prod_G7PBaKVHAfyk2j';

// Live Product
// $productId = 'prod_Eb1ymXlpPSJ3ZC';Code language: PHP (php)

Things to change in scripts-stripe.js

Under the configure section, uncomment or comment the correct environment keys.

/* Test Keys */
var stripeKeyAce        = 'pk_test_Ll8uUALxog9cPXCAPhMEmYZ3';
var stripeKeyAceCoffee  = 'pk_test_msVvdbCwbclnWFjeVG5mkf7M';

/* Live Keys */
// var stripeKeyAce        = 'pk_live_1e5SvlNSFCxgEl0KxdJCEBXJ';
// var stripeKeyAceCoffee  = 'pk_live_y0BgloyZ998GCnupTsoBudyJ';Code language: JavaScript (javascript)