Skip to content

Instantly share code, notes, and snippets.

@itisnot-me
Created February 19, 2017 05:12
Show Gist options
  • Save itisnot-me/a66a8019116d4626423368a942a9972a to your computer and use it in GitHub Desktop.
Save itisnot-me/a66a8019116d4626423368a942a9972a to your computer and use it in GitHub Desktop.
//goes great with my DB structure. like cake
//custom items not from the charge json
$invoiceid = '';//create a unique invoice id for your transaction
$transactiontoken = '';//the token passed through from stripe.js
$itemname = 'green apples';//sent through with token and double checked
$itemdesc = 'delicious green apples';//sent through with token and double checked
$itemamount = '';//sent through with token and double checked
$applicationfee = '';//the fee that you sent through the charge
$buyeremail = '[email protected]';//sent through with token from stripe.js
$chargeid = $charge->id;
$application_fee_id = $charge->application_fee_id;
$object = $charge->object;
$amount = $charge->amount;
$amount_refunded = $charge->amount_refunded;
$application = $charge->application;
$application_fee = $charge->application_fee;
$balance_transaction = $charge->balance_transaction;
$captured = $charge->captured;
$created = $charge->created;
$currency = $charge->currency;
$customer = $charge->customer;
$description = $charge->description;
$destination = $charge->destination;
$dispute = $charge->dispute;
$failure_code = $charge->failure_code;
$failure_message = $charge->failure_message;
$fraud_details = $charge->fraud_details;
$invoice = $charge->invoice;
$livemode = $charge->livemode;
$metadata = $charge->metadata;
$on_behalf_of = $charge->on_behalf_of;
$transaction_order = $charge->order;
$outcome = $charge->outcome;
$paid = $charge->paid;
$receipt_email = $charge->receipt_email;
$receipt_number = $charge->receipt_number;
$refunded = $charge->refunded;
$refunds_data = $charge->refunds->data;
$refunds_has_more = $charge->refunds->has_more;
$refunds_total_count = $charge->refunds->total_count;
$refunds_url = $charge->refunds->url;
$refunds = $charge->refunds;
$review = $charge->review;
$shipping = $charge->shipping;
$source_brand = $charge->source->brand;
$source_country = $charge->source->country;
$source_customer = $charge->source->customer;
$source_cvc_check = $charge->source->cvc_check;
$source_dynamic_last4 = $charge->source->dynamic_last4;
$source_exp_month = $charge->source->exp_month;
$source_exp_year = $charge->source->exp_year;
$source_funding = $charge->source->funding;
$source_last4 = $charge->source->last4;
$source_name = $charge->source->name;
$source_tokenization_method = $charge->source->tokenization_method;
$source = $charge->source;
$source_transfer = $charge->source_transfer;
$statement_descriptor = $charge->statement_descriptor;
$status = $charge->status;
$transfer_group = $charge->transfer_group;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment