Ejemplo n.º 1
0
function getShippingAddress($subscriptionId)
{
    $addressReqParams = array("subscriptionId" => $subscriptionId, "label" => "shipping_address");
    $shippingAddress = null;
    try {
        $result = ChargeBee_Address::retrieve($addressReqParams);
        return $result->address();
    } catch (ChargeBee_APIError $e) {
        $jsonError = $e->getJsonObject();
        if ($jsonError['error_code'] != "resource_not_found") {
            throw $e;
        }
        return null;
    }
}
Ejemplo n.º 2
0
<?php

require_once '../partials/header.php';
require_once dirname(__FILE__) . '/../php_src/Util.php';
$result = ChargeBee_Address::retrieve(array("subscription_id" => $_GET["subscription_id"], "label" => "Shipping Address"));
$address = $result->address();
?>
<h1 class="text-center" style="font-size: 50px; margin: 40px;"> Thank You </h1>
<div class="col-sm-8 col-sm-offset-2">
<h4> Your comics will be shipped to the following address each month:</h4>

<div class="form-horizontal">
            <div class="form-group">
                <label class="text-muted control-label col-sm-3">Address</label>
                <span class="col-sm-9 form-control-static">
		<?php 
echo esc($address->addr) . ", " . esc($address->extendedAddr == null ? "" : $address->extendedAddr . ",");
?>
</span>
            </div>
            <div class="form-group">
                <label class="text-muted control-label col-sm-3">City</label>
                <span class="col-sm-9 form-control-static"> <?php 
echo esc($address->city) . ",";
?>
 </span>
            </div>
            <div class="form-group">
                <label class="text-muted control-label col-sm-3">State </label>
                <span class="col-sm-9 form-control-static"> <?php 
echo esc($address->state) . ",";