Ejemplo n.º 1
0
$field->fieldId = "mm_field_billing_state";
$field->fieldName = "billingstate";
$field->label = "State";
$fieldInfo[] = $field;
$field = new stdClass();
$field->fieldId = "mm_field_billing_zip";
$field->fieldName = "billingzipcode";
$field->label = "Zip Code";
$fieldInfo[] = $field;
$field = new stdClass();
$field->fieldId = "mm_field_billing_country";
$field->fieldName = "billingcountry";
$field->label = "Country";
$fieldInfo[] = $field;
$orderItem = new MM_OrderItem($p->orderItemId);
$order = new MM_Order($orderItem->getOrderId());
$billingAddress = $order->getBillingAddress();
$data = array();
$data["mm_field_billing_address"] = $billingAddress->getAddressLine1();
$data["mm_field_billing_city"] = $billingAddress->getCity();
$data["mm_field_billing_state"] = $billingAddress->getState();
$data["mm_field_billing_zip"] = $billingAddress->getPostalCode();
$data["mm_field_billing_country"] = $billingAddress->getCountry();
$form = new MM_CheckoutForm();
if (!isset($data["mm_field_billing_country"])) {
    $data["mm_field_billing_country"] = "";
}
$form->billingCountryList = MM_HtmlUtils::getCountryList($data["mm_field_billing_country"]);
$ccExpDateRendered = false;
echo $form->getJavascriptIncludes(false);
?>
<?php

$order = MM_Order::create($p->orderId);
if ($order->isValid()) {
    $orderItem = MM_OrderItem::create($p->orderItemId);
    if ($orderItem->isValid()) {
        ?>
<div id='mm-edit-transaction-div'>
<input type='hidden' id='order_id' value='<?php 
        echo $p->orderId;
        ?>
' />
<input type='hidden' id='order_item_id' value='<?php 
        echo $p->orderItemId;
        ?>
' />
<input type='hidden' id='transaction_id' value='<?php 
        echo $p->transactionId;
        ?>
' />
<div style="font-size:11px;">
<?php 
        if ($orderItem->isRecurring()) {
            echo MM_Utils::getInfoIcon();
            ?>
	<em>This transaction is associated with a subscription. Any changes made here will be applied to this transaction and
	future recurring payments.</em> 
<?php 
        }
        ?>
<table>