first commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<pre>
|
||||
<?php
|
||||
|
||||
include('../backend.php');
|
||||
$hostname = $wrenchboard->cfgReadChar("database.host");
|
||||
$username = $wrenchboard->cfgReadChar("database.user");
|
||||
$password = $wrenchboard->cfgReadChar("database.pass");
|
||||
$database = $wrenchboard->cfgReadChar("database.name");
|
||||
$dbconn = pg_connect("host=${hostname} dbname=${database} user=${username} password=${password}");
|
||||
|
||||
$q = "SELECT * FROM members WHERE stripe_customer_id IS NULL ORDER BY id LIMIT 1";
|
||||
$r = pg_query($q);
|
||||
$f = pg_fetch_assoc($r);
|
||||
|
||||
$in=array(
|
||||
"action" => 90005, /* WRENCHBOARD_STRIPE_CHARGE_NEW */
|
||||
"ccnum" => "4242424242424242",
|
||||
"ccexpm" => "12",
|
||||
"ccexpy" => "18",
|
||||
"cccvc" => "123",
|
||||
"amount" => "100",
|
||||
"customer_id" => $f["id"],
|
||||
"email" => $f["email"],
|
||||
"description" => "This is a test charge for new stripe account"
|
||||
);
|
||||
$out=array();
|
||||
$ret = $wrenchboard->wrenchboard_api($in, $out);
|
||||
var_dump($ret);
|
||||
var_dump($out);
|
||||
|
||||
pg_close($dbconn);
|
||||
Reference in New Issue
Block a user