Skip to content

Instantly share code, notes, and snippets.

@SecurityForUs
Created December 3, 2012 20:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save SecurityForUs/4197951 to your computer and use it in GitHub Desktop.
Save SecurityForUs/4197951 to your computer and use it in GitHub Desktop.
-- in my HTML stuff:
function callback(resp){
var msg = "";
var status = "";
switch(resp.status){
case 201:
$.ajax({
type: 'POST',
async: false,
url: 'process.php?email='+load('mail')+'&cc='+resp.data.uri,
<truncated for brevity>
-- in PHP:
<?php
// Startup the Balanced API stuff
require(__DIR__ . '/vendor/autoload.php');
Httpful\Bootstrap::init();
Balanced\Bootstrap::init();
// Get the card URI
$uri = $_POST['cc']; // this now has the response.data.uri value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment