Exemplo n.º 1
0
require_once __DIR__ . '/../res/autoload.php';
/*
 * Developed by Filipe Camargo.
 * Licensed to Titanium Technology & Titanium Coins
 * Any questions send mail to: contact@titaniumcoin.net
 * www.titaniumcoin.net
 */
use Titanium\Checkout\Customer;
use Titanium\Checkout\Invoice;
use Titanium\Checkout\InvoiceItems;
use Titanium\Checkout\Checkout;
/**
 * Start the checkout with your token
 */
$checkout = new Checkout('4f94209cb670de6c4f8491bb9d538cf2', 'localhost');
/**
 * Create a customer
 */
$customer = new Customer();
$customer->setName('User test');
$customer->setEmail('*****@*****.**');
$customer->setAddress('R do porto');
$customer->setNumber('304');
$customer->setCountry('Brasil');
$customer->setCity('Piracicaba');
$customer->setState('São Paulo');
$customer->setTaxId('13245678462');
$customer->setZip_code('456454789');
/**
 * Attach invoice customer
Exemplo n.º 2
0
<?php

require_once __DIR__ . '/../res/autoload.php';
/*
 * Developed by Filipe Camargo.
 * Licensed to Titanium Technology & Titanium Coins
 * Any questions send mail to: contact@titaniumcoin.net
 * www.titaniumcoin.net
 */
use Titanium\Checkout\Invoice;
use Titanium\Checkout\Checkout;
/**
 * Start the checkout with your token
 */
$checkout = new Checkout('your_company_token');
$checkout->setInvoiceToken('your_invoice_hash');
/**
 * Attach the invoice status return to variable status
 */
$invoice = $checkout->status();
/**
 * Check invoice status
 */
echo $invoice->status;