code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Shopping Cart</title> <link rel="stylesheet" type="text/css" href="./css/style.css" /> </head> <body> <div id="wrap"> {include file="header.html"} <div class="center_content"> <!--end of left content{include file="leftLogin.html"}--> {include file="rightCheckoutFinish.html"} <div class="clear"></div> </div> <!--end of center content--> {include file="footer.html"} </div> </body> </html>
123gohelmetsv2
trunk/templates_en-US/checkoutFinish.html
HTML
asf20
626
<div class="right_content"> <div class="right_box"> <div class="title"> <span class="title_icon"><img src="{$HOME_URL}/images/btn1.jpg" alt="" title="" /> </span>Promotions </div> {section name=info loop=$specProducts} <div class="new_prod_box"> <div class="new_prod_bg"> <span class="new_icon"><img src="{$HOME_URL}/images/special_icon.gif" alt="{$specProducts[info].name}" title="{$specProducts[info].name}" /> </span> <a href="{$HOME_URL}/p/{$specProducts[info].id}/{$objStrings->getCharNum({$specProducts[info].name})}.html"> <img src="{$HOME_URL}/admin/pic/thumbnail.php?width=90&height=90&fileName={$specProducts[info].imageid}.{$specProducts[info].imageExt}" alt="{$specProducts[info].name}" title="{$specProducts[info].name}" class="thumb" border="0" /> </a> </div> <div class="product-title-grid"> <a href="{$HOME_URL}/p/{$specProducts[info].id}/{$objStrings->getCharNum({$specProducts[info].name})}.html" class="product-title">{$specProducts[info].name}</a> <br> {if $specProducts[info].finalPrice > 0} <span class="nprice-g">${$specProducts[info].finalPrice / 100}</span> <span class="oprice-g"><s>${$specProducts[info].price / 100}</s></span> {else} <span class="nprice-g">${$specProducts[info].price / 100}</span> {/if} </div> </div> {/section} </div> <div class="right_box_right"> <div class="title"> <span class="title_icon"><img src="{$HOME_URL}/images/service_icon_large.gif" alt="" title="" /> </span>Categories </div> <ul class="list"> {foreach item=data key=key from=$topCategory} <span class="category-title">{$data}</span> {foreach item=leaf key=subid from=$categorys[$key]} <li><a href="{$HOME_URL}/c/{$subid}/1/{$objStrings->getCharNum({$leaf})}.html">{$leaf|truncate:100:"..."}</a> </li> {/foreach} {/foreach} </ul> </div> </div>
123gohelmetsv2
trunk/templates_en-US/rightViewCart.html
HTML
asf20
1,926
<!-- <div class="right_checkout_content">--> <div class="right_checkout_box"> <div class="car_title"><span class="title_icon"><img src="images/service_icon_large.gif" alt="" title="" /></span>Quick Checkout</div> <div class="feat_prod_box_details"> <form name="fm" action="" method="post"> <table class="quick_check_out_table" border="0"> <tr><td colspan="3"><span class="red">{$error_message}</span></td></tr> <tr> <td colspan="3" align="left" height="35"> <span class="checkout_title"><b>Customer Contact Information</b></span> &nbsp;&nbsp;&nbsp;&nbsp; </td> </tr> <tr> <td colspan="3" align="left"> <strong class="checkout-left"> {if $objOrdersInfo->getEmail() != ""} {$objOrdersInfo->getEmail()} {else if $objCustomerDao->getEmail() != ""} {$objCustomerDao->getEmail()} {else} Telephone {/if} </strong> </td> </tr> {if $oDeliveryAddress == null} <tr><td colspan="3" align="left" height="35"><span class="checkout_title"><b>Shipping Address</b></span> &nbsp;&nbsp;&nbsp;&nbsp; <!--<input type="submit" name="address_submit" class="btn" value="Save" onClick="return checkForm();" />--> </td> </tr> <tr> <td align="left" height="20" width="200"><strong class="checkout_left">First Name <font color="#ff0000"><b>*</b></font></strong> </td> <td align="left" width="200">&nbsp;<strong>Last Name <font color="#ff0000"><b>*</b></font></strong> </td> <td align="left">&nbsp;<strong>Phone Number <font color="#ff0000"><b>*</b></font></strong> </td> </tr> <tr> <td align="left" height="30"> <strong class="checkout_left"><input type="text" name="firstname" id="firstname" value="{$firstname}" title="First Name" maxlength="64" size="20" /></strong> </td> <td align="left"> <input type="text" name="lastname" id="lastname" value="{$lastname}" title="Last Name" maxlength="64" size="20" /> </td> <td align="left"> <input type="text" name="phoneNumber" id="phoneNumber" value="{$phoneNumber}" title="Phone Number" maxlength="32" size="20" /> </td> </tr> <tr><td colspan="3" align="left"><strong class="checkout_left">Street Address</strong><font color="#ff0000"><b>*</b></font></td></tr> <tr> <td colspan="3" align="left"> <strong class="checkout_left"><input type="text" name="street" id="street" value="{$street}" title="Street Address" maxlength="250" size="80" /></strong> </td> </tr> <tr><td colspan="3" align="left"> <table width="100%"> <tr> <td align="left" height="20" width="200"><strong class="checkout_left">City<font color="#ff0000"><b>*</b></font></strong> </td> <td align="left" width="200"><strong>&nbsp;State <font color="#ff0000"><b>*</b></font></strong> </td> <td align="left" width="120"><strong>&nbsp;Zip Code <font color="#ff0000"><b>*</b></font></strong> </td> <td align="left"><strong>Country <font color="#ff0000"><b>*</b></font></strong> </td> </tr> <tr> <td align="left"> <strong class="checkout_left"><input type="text" name="city" id="city" value="{$city}" title="City" maxlength="14" size="20" /></strong> </td> <td align="left"> {if $hasZone == 'yes'} <select name=zoneid style="height:22px; margin-top:0px;"> {html_options options=$arrZones selected=$zoneid} </select> {else} <input type="text" name="state" id="state" value="{$state}" maxlength="32" size="20" /> {/if} </td> <td align="left"> <input type="text" name="zipcode" id="zipcode" value="{$zipcode}" title="zipcode" maxlength="32" size="10" /> </td> <td align="left"> <select name="countryId" style="height:22px; margin-top:0px;" onChange="return submit();"> {html_options options=$arrCountries selected=$countryId} </select> </td> </tr> </table> </td> </tr> <tr><td colspan="3">&nbsp;</td></tr> <tr><td colspan="3"><input type="submit" name="address_submit" class="coupon" value="Next" onclick="return checkForm();" /></td></tr> {else} <tr><td colspan="3" align="left" height="35"><span class="checkout_title"><b>Shipping Address</b></span> &nbsp;&nbsp;&nbsp;&nbsp; <input type="submit" class="btn" name="address_edit" value="Edit" /> </td> </tr> <tr> <td colspan="3" align="left"> <strong class="checkout-left">{$oDeliveryAddress->getFirstName()} {$oDeliveryAddress->getLastName()} {$oDeliveryAddress->getStreet()} {$oDeliveryAddress->getCity()}, {$oDeliveryAddress->getState()} {$oDeliveryAddress->getZipcode()} {$oDeliveryAddress->getCountry()} </strong> </td> </tr> <tr><td colspan="3" align="left" height="35"><span class="checkout_title"><b>Payment Method</b></span></td></tr> <tr> <td align="left" height="30" colspan="3"> {if $paymentMethod == 'moneyOrder'} <strong class="checkout-title-left"><input type="radio" name="paymentMethod" value="moneyOrder" onclick="hiddeOtherPaymentMethod();" checked="checked" />Money Order</strong> {else} <strong class="checkout-title-left"><input type="radio" name="paymentMethod" value="moneyOrder" onclick="hiddeOtherPaymentMethod();" />Money Order</strong> {/if} {if $paymentMethod == 'DirectPayment'} <strong class="checkout-title-left"><input type="radio" name="paymentMethod" value="DirectPayment" onclick="hiddeOtherPaymentMethod();displayCreditCard();" checked="checked" />Credit Card</strong> {else} <strong class="checkout-title-left"><input type="radio" name="paymentMethod" value="DirectPayment" onclick="hiddeOtherPaymentMethod();displayCreditCard();" />Credit Card</strong> {/if} {if $paymentMethod == 'Expresscheck'} <strong class="checkout-title-left"><input type="radio" name="paymentMethod" value="ExpressCheckout" onclick="hiddeOtherPaymentMethod();displayPaypal();" checked="checked" />Paypal</strong> {else} <strong class="checkout-title-left"><input type="radio" name="paymentMethod" value="ExpressCheckout" onclick="hiddeOtherPaymentMethod();displayPaypal();" />Paypal</strong> {/if} </td> </tr> <tr style="display:none" id='paypal'> <td colspan="3" align="left" height="50"> <strong class="checkout_left_sub"><img src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" border=0 style="padding-right:10px;padding-bottom:10px"></strong> </td> </tr> <tr style="display:none" id='credit_card_1'><td colspan="3" align="left"> <table width="100%"> <tr> <td align="left" height="20" width="300"><strong class="checkout_left_sub">First Name on Credit Card<font color="#ff0000"><b>*</b></font></strong> </td> <td align="left"><strong>&nbsp;Last Name on Credit Card<font color="#ff0000"><b>*</b></font></strong> </td> </tr> <tr> <td align="left"> <strong class="checkout_left_sub"><input type="text" name="cc_firstname" size="30"></strong> </td> <td align="left"><input type="text" name="cc_firstname" size="30"> </td> </tr> </table> </td> </tr> <tr style="display:none" id='credit_card_2'><td colspan="3" align="left"> <table width="100%"> <tr> <td align="left" height="20" width="200"><strong class="checkout_left_sub">Credit Card Type <font color="#ff0000"><b>*</b></font></strong> </td> <td align="left" width="200"><strong>&nbsp;Credit Card Number <font color="#ff0000"><b>*</b></font></strong> </td> <td align="left"><strong>&nbsp;Credit Card Expiry Date <font color="#ff0000"><b>*</b></font></strong> </td> </tr> <tr> <td align="left"><strong class="checkout_left_sub"> <select name="cc_type"> <option value="Visa">Visa</option> <option value="MasterCard">MasterCard</option> <option value="Discover">Discover</option> </select></strong> </td> <td align="left"> <input type="text" name="cc_number"> </td> <td align="left"> <select name="cc_expires_month"> <option value="01">January</option> <option value="02">February</option> <option value="03">March</option> <option value="04">April</option> <option value="05">May</option> <option value="06">June</option> <option value="07">July</option> <option value="08">August</option> <option value="09">September</option> <option value="10">October</option> <option value="11">November</option> <option value="12">December</option> </select>&nbsp; <select name="cc_expires_year"> <option value="2010">2010</option> <option value="2011">2011</option> <option value="2012">2012</option> <option value="2013">2013</option> <option value="2014">2014</option> <option value="2015">2015</option> <option value="2016">2016</option> <option value="2017">2017</option> <option value="2018">2018</option> <option value="2019">2019</option> </select> </td> </tr> </table> </td> </tr> <tr><td colspan="3" align="left" height="35">&nbsp;<span class="checkout_title"><b>Shipping Method</b></span></td></tr> <tr><td colspan="3" align="left"> <strong class="checkout-title-left"> {html_radios name="id" options=$arrShippingMethod checked=$shippingMethodId separator="<br />"} </strong> </td> </tr> <tr><td colspan="3" align="left" height="35">&nbsp;<span class="checkout_title"><b>Order Total</b></span></td></tr> <tr><td colspan="3" align="left"> <strong class="checkout-title-left">Product Total:</strong>&nbsp;&nbsp;<span class="nprice-g">${$objOrdersInfo->getAccount()->getProductTotal()|string_format:"%.2f"} + </span> <strong class="checkout-title">Tax:</strong>&nbsp;&nbsp;<span class="nprice-g">${$objOrdersInfo->getAccount()->getTaxTotal()|string_format:"%.2f"} + </span> <strong class="checkout-title">Shipping:</strong>&nbsp;&nbsp;<span class="nprice-g">${$objOrdersInfo->getAccount()->getShippingTotal()|string_format:"%.2f"} - </span> <strong class="checkout-title">Save off:</strong>&nbsp;&nbsp;<span class="nprice-g">${$objOrdersInfo->getAccount()->getSaveOff()|string_format:"%.2f"}</span> </td> </tr> <tr><td colspan="3" align="right" height="30">&nbsp;<strong class="checkout-title">Total:</strong> <span class="nprice-g">${$objOrdersInfo->getAccount()->getAllTotal()}</span>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr> <tr><td colspan="3" align="left" height="35">&nbsp;<span class="checkout_title"><b>Comments</b></span></td></tr> <tr><td colspan="3" align="left"><strong class="checkout-left">Add Comments About Your Order</strong></td></tr> <tr> <td colspan="3" align="left"> <strong class="checkout_left_sub"><input type="text" name="comments" value="{$objOrdersInfo->getComments()}" maxlength="250" size="100" /></strong> </td> </tr> <tr><td colspan="3"><input type="submit" name="Submit" class="coupon" value="Next" onclick="return checkSubmit();" /></td></tr> {/if} <tr><td colspan="3">&nbsp;</td></tr> </table> </form> </div> </div>
123gohelmetsv2
trunk/templates_en-US/rightCheckout.html
HTML
asf20
13,478
<div class="left_content"> <div class="car_title"><span class="title_icon"><img src="images/service_icon_large.gif" alt="" title="" /></span>REGISTERED CUSTOMER CHECKOUT</div> <div class="feat_prod_box_details"> <form name="login" action="./login.php" method="post"> <table class="coupon_table"> <tr> <td colspan="3" class="email_checkout"> Enter your 123gohelmets.com email address and password to enjoy an express checkout </td> </tr> <tr><td colspan="3"><span class="nprice-g-c">{$error_message_login}</span></td></tr> <tr> <td align="right" height="50" width="120"> <strong>E-Mail:</strong> </td> <td> <input type="text" name="email" value="{$email}" class="contact_input" /> </td> </tr> <tr> <td align="right" height="50" width="120"> <strong>Password:</strong> </td> <td> <input type="password" name="password" maxlength="40" class="contact_input" /> </td> </tr> <tr> <td colspan="3"> <input name="action" type="hidden" value="guest_email"> <input type="submit" class="checkout_login" value="Login" />&nbsp;&nbsp;&nbsp;&nbsp; </td> </tr> <tr><td colspan="3">&nbsp;</td></tr> <tr><td colspan="3" align="right"><a href="./passwordForgotten.php">Password forgotten? Click here.</a>&nbsp;&nbsp;&nbsp;</td></tr> </table> </form> </div> <div class="clear"></div> </div>
123gohelmetsv2
trunk/templates_en-US/leftPreCheckout.html
HTML
asf20
1,794
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> {include file="includeMeta.html"} <meta name="title" content="Motorcycle helmets and Motorcycle helmet - 123gohelmets.com" /> <title>Motorcycle helmets and Motorcycle helmet -123gohelmets.com</title> <link rel="stylesheet" type="text/css" href="{$HOME_URL}/css/style.css" /> </head> <body> <div id="wrap"> {include file="header.html"} <div class="center_content"> {include file="leftShippingAndPayment.html"} <!--end of left content--> {include file="rightHome.html"} <!--end of right content--> <div class="clear"></div> </div> <!--end of center content--> {include file="footer.html"} </div> </body> </html>
123gohelmetsv2
trunk/templates_en-US/shippingAndPayment.html
HTML
asf20
839
<?php /* * Created on Sep 13, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once("Smarty.class.php"); //--> out template include_once("Common.php"); include_once("UploadFiles.php"); //--> UploadFiles include_once("customerSession.inc.php"); include_once ("Session.php"); //-- Session include_once("Strings.php"); //--> String utils include_once("orders/Cart.php"); //--> Cart include_once("orders/CartProduct.php"); //--> Cart include_once("orders/CartProductAttribute.php"); //--> Cart require_once('includeHttps.php'); $common = new Common(); $objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session $objCart = new Cart(); //--> Cart $objStrings = new Strings(); /*----- check session -----*/ $isLogin = false; if(!$objSession->exist()) { $location = HOME_URL . '/login.php'; header("Location: $location"); exit; }else $isLogin = true; $username = $objSession->getUserName(); session_start(); if($_SESSION['cart']) $objCart = unserialize($_SESSION['cart']); include_once("includeCategory.php"); //--> include category include_once("includeSpec.php"); //--> include spec /*----- out html -----*/ $smarty = new Smarty(); //-- out template $smarty->template_dir = TEMPLATE_DIR; $smarty->compile_dir = COMPILE_DIR; $smarty->cache_dir = CACHE_DIR; $smarty->force_compile = false; $smarty->debugging = false; $smarty->caching = false; $smarty->cache_lifetime = 120; $smarty->assign('error_message', $error_message); $smarty->assign('HOME_URL', HOME_URL); $smarty->assign('HOME_URL_HTTP', HOME_URL); $smarty->assign('categorys', $categorys); $smarty->assign('topCategory', $topCategory); $smarty->assign('specProducts', $specProducts); $smarty->assign('username', $username); $smarty->assign('objCart', $objCart); $smarty->assign('objStrings', $objStrings); $smarty->assign('isLogin', $isLogin); $smarty->display('myaccount.html'); ?>
123gohelmetsv2
trunk/myaccount.php
PHP
asf20
2,154
<?php /* * Created on Sep 13, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once("./configure/configure.php"); //--> global var include_once("Smarty.class.php"); //--> out template include_once("Common.php"); include_once("UploadFiles.php"); //--> UploadFiles include_once("customerSession.inc.php"); include_once ("Session.php"); //-- Session include_once("Country.php"); //--> Country include_once("AddressBook.php"); //--> AddressBook include_once("Zone.php"); //--> Zone include_once("Strings.php"); //--> String utils include_once("orders/Cart.php"); //--> Cart include_once("orders/CartProduct.php"); //--> Cart include_once("orders/CartProductAttribute.php"); //--> Cart require_once('includeHttps.php'); $common = new Common(); $objSession = new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME); //-- session $objCountry = new Country(0); //--> Country $objAddressBook = new AddressBook(0); //--> AddressBook $objZone = new Zone(0); //--> Zone $objCart = new Cart(); //--> Cart $objStrings = new Strings(); $customerid = 0; /*----- check session -----*/ if($objSession->exist()) { $customerid = $objSession->getUserID(); }else{ $location = './myaccount.php'; header("Location: $location"); exit; } if($_SESSION['cart']) $objCart = unserialize($_SESSION['cart']); $firstname = ''; $lastname = ''; $company = ''; $postcode = ''; $state = ''; $city = ''; $street = ''; $zoneid = 0; if(isset($_POST['countryId'])) $countryId = $_POST['countryId']; else $countryId = 223; $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $countryId = $_POST['countryId']; $company = ''; $postcode = $_POST['postcode']; $city = $_POST['city']; $street = $_POST['street']; $state = $_POST['state']; $zoneid = $_POST['zoneid']; /*----- add new address book -----*/ if(isset($_POST['action']) && $_POST['action'] == 'Submit'){ $gender = ''; if(empty($zoneid)) $zoneid = $ZONE_ID; if(empty($firstname)) $error_message = 'The first name should\'t be empty.'; else if(empty($lastname)){ $error_message = 'The last name should\'t be empty.'; }else if(empty($street)){ $error_message = 'The street address should\'t be empty.'; }else if(empty($postcode)){ $error_message = 'The postcode should\'t be empty.'; }else if(empty($city)){ $error_message = 'The city should\'t be empty.'; } if(empty($state) && !empty($zoneid)){ $sql = "SELECT name FROM zones WHERE id = $zoneid"; $state = $common->getColumn(DB_TAG_PUBLIC, $sql); } if(empty($error_message)){ $id = $objAddressBook->add($customerid, $gender, $company, $firstname, $lastname, $street, $suburb, $postcode, $city, $state, $countryId, $zoneid); if($id){ if(!empty($primary)){ $sql = "UPDATE customers SET modifiedTime = UTC_TIMESTAMP(), default_address_id = '$id' WHERE id = $customerid"; $isSuccess = $common->update(DB_TAG_SYSTEM, $sql); } $location = './addressBookList.php'; header("Location: $location"); exit; }else{ $error_message = 'Add failure.'; } } } include_once("includeCategory.php"); //--> include category include_once("includeSpec.php"); //--> include spec $arrCountries = $objCountry->getGroupList(); /*-- get zone -----*/ $arrZones = $objZone->getGroupList($countryId); if(count($arrZones) > 0) $hasZone = 'yes'; /*----- out html -----*/ $smarty = new Smarty(); //-- out template $smarty->template_dir = TEMPLATE_DIR; $smarty->compile_dir = COMPILE_DIR; $smarty->cache_dir = CACHE_DIR; $smarty->force_compile = true; $smarty->debugging = false; $smarty->caching = false; $smarty->cache_lifetime = 120; $smarty->assign('error_message', $error_message); $smarty->assign('HOME_URL', HOME_URL); $smarty->assign('HOME_URL_HTTP', HOME_URL); $smarty->assign('categorys', $categorys); $smarty->assign('topCategory', $topCategory); $smarty->assign('specProducts', $specProducts); $smarty->assign('objCart', $objCart); $smarty->assign('objStrings', $objStrings); $smarty->assign('countryId', $countryId); $smarty->assign('arrCountries', $arrCountries); $smarty->assign('firstname', $firstname); $smarty->assign('lastname', $lastname); $smarty->assign('telephone', $telephone); $smarty->assign('fax', $fax); $smarty->assign('company', $company); $smarty->assign('postcode', $postcode); $smarty->assign('state', $state); $smarty->assign('city', $city); $smarty->assign('street', $street); $smarty->assign('hasZone', $hasZone); $smarty->assign('arrZones', $arrZones); $smarty->assign('zoneid', $zoneid); $smarty->display('addressBookAdd.html'); ?>
123gohelmetsv2
trunk/addressBookAdd.php
PHP
asf20
4,918
<?php // Ack related constants define('ACK_SUCCESS', 'Success'); define('ACK_SUCCESS_WITH_WARNING', 'SuccessWithWarning'); // Refund related constants define('REFUND_PARTIAL', 'Partial'); define('REFUND_FULL', 'Full'); // Profile define('ENVIRONMENT', 'sandbox'); //define('API_USER_NAME', 'ldmmyx_1290428383_biz_api1.hotmail.com'); //define('API_PASSWORD', 'DV78ZBH9VUDEP5X2'); //define('SIGNATURE', 'AFcWxV21C7fd0v3bYYYRCpSSRl31Avl-vTRf-Vl2t--Bm27SLclnYEhz'); define('API_USER_NAME', 'ldmmyx_1291703152_biz_api1.hotmail.com'); define('API_PASSWORD', '1291703182'); define('SIGNATURE', 'A.EIbkFh.4SMbEjs0F4q68jVCyXVAiqvC.bALAVVPM-UvLH6aiKyDWjc'); define('PROXY', ''); define('DEV_CENTRAL_URL', 'https://developer.paypal.com'); ?>
123gohelmetsv2
trunk/lib/paypal-app/constants.inc.php
PHP
asf20
759
<?php /* * Created on Dec 2, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ class PaypalInfo { private $APIProfile; private $token; private $payerid; private $paymentType; private $paymentAmount; private $currencyCodeType; private $paymentMethod; private $cc_firstname; private $cc_lastname; private $cc_type; private $cc_number; private $cc_expires_year; private $cc_expires_month; private $cc_checkcode; public function PaypalInfo() { } public function setToken($token) { $this->token = $token; } public function getToken() { return $this->token; } public function setPayerid($payerid) { $this->payerid = $payerid; } public function getPayerid() { return $this->payerid; } public function setPaymentType($paymentType) { $this->paymentType = $paymentType; } public function getPaymentType() { return $this->paymentType; } public function setPaymentAmount($paymentAmount) { $this->paymentAmount = $paymentAmount; } public function getPaymentAmount() { return $this->paymentAmount; } public function setPaymentMethod($paymentMethod) { $this->paymentMethod = $paymentMethod; } public function getPaymentMethod() { return $this->paymentMethod; } public function setCurrencyCodeType($currencyCodeType) { $this->currencyCodeType = $currencyCodeType; } public function getCurrencyCodeType() { return $this->currencyCodeType; } public function setAPIProfile($APIProfile) { $this->APIProfile = $APIProfile; } public function getAPIProfile() { return $this->APIProfile; } public function setCCFirstName($cc_firstname) { $this->cc_firstname = $cc_firstname; } public function getCCFirstName() { return $this->cc_firstname; } public function setCCLastName($cc_lastname) { $this->cc_lastname = $cc_lastname; } public function getCCLastName() { return $this->cc_lastname; } public function setCCType($cc_type) { $this->cc_type = $cc_type; } public function getCCType() { return $this->cc_type; } public function setCCNumber($cc_number) { $this->cc_number = $cc_number; } public function getCCNumber() { return $this->cc_number; } public function setCCYear($cc_expires_year) { $this->cc_expires_year = $cc_expires_year; } public function getCCYear() { return $this->cc_expires_year; } public function setCCExpiresMonth($cc_expires_month) { $this->cc_expires_month = $cc_expires_month; } public function getCCExpiresMonth() { return $this->cc_expires_month; } public function setCCCheckCode($cc_checkcode) { $this->cc_checkcode = $cc_checkcode; } public function getCCCheckCode() { return $this->cc_checkcode; } } ?>
123gohelmetsv2
trunk/lib/paypal-app/PaypalInfo.php
PHP
asf20
2,988
<?php /* * Created on Nov 27, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ require_once 'ppsdk_include_path.inc'; require_once 'PayPal.php'; require_once 'PayPal/Profile/Handler/Array.php'; require_once 'PayPal/Profile/API.php'; require_once 'paypal-sdk/Log.php'; require_once 'constants.inc.php'; require_once 'SampleLogger.php'; class PaymentPro { private $logger; private $paymentMethod; public function PaymentPro() { $this->logger = new SampleLogger('PaymentPro.php', PEAR_LOG_DEBUG); } public function getPaypalURL() { $paypalURL = ''; if(ENVIRONMENT == 'live') { $paypalURL = 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token='; } else { $paypalURL = 'https://www.' . ENVIRONMENT . '.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token='; } return $paypalURL; } public function profile3Tokens($subject = null, $usename, $password, $signature, $environment) { $handler =& ProfileHandler_Array::getInstance(array( 'username' => $usename, 'environment' => $environment, 'certificateFile' => null, 'subject' => null, )); $pid = ProfileHandler::generateID(); $profile = & new APIProfile($pid, $handler); $profile->setAPIUsername($usename); $profile->setAPIPassword($password); $profile->setSignature($signature); $profile->setSubject($subject); $profile->setEnvironment($environment); $this->logger->_log('Profile: '. print_r($profile, true)); return $profile; } public function sessionStart3Tokens($subject = null, $usename = API_USER_NAME, $password = API_PASSWORD, $signature = SIGNATURE, $environment = ENVIRONMENT) { $profile = $this->profile3Tokens($subject, $usename, $password, $signature, $environment); $caller =& PayPal::getCallerServices($profile); return $profile; } public function markCardNumber($cardNumber) { if(empty($cardNumber)) return ''; return substr($cardNumber, 0, 4) . str_repeat('X', (strlen($cardNumber) - 8)) . substr($cardNumber, -4); } } ?>
123gohelmetsv2
trunk/lib/paypal-app/PaymentPro.php
PHP
asf20
2,244
<?php require_once 'Log.php'; /** * Class to handle logging for the PHP SDK sample apps. * * @package samples_php */ class SampleLogger { /** * PHP Sample being logged * * @var string $_logSample */ var $_logSample; /** * What level should we log at? Valid levels are: * PEAR_LOG_ERR - Log only severe errors. * PEAR_LOG_INFO - (default) Date/time of operation, operation name, elapsed time, success or failure indication. * PEAR_LOG_DEBUG - Full text of SOAP requests and responses and other debugging messages. * * See the PayPal SDK User Guide for more details on these log * levels. * * @access protected * * @var integer $_logLevel */ var $_logLevel = PEAR_LOG_INFO; /** * If we're logging, what directory should we create log files in? * Note that a log name coincides with a symlink, logging will * *not* be done to avoid security problems. File names are * <DateStamp>.PayPal.log. * * @access protected * * @var string $_logFile */ var $_logDir = '/tmp'; /** * The PEAR Log object we use for logging. * * @access protected * * @var Log $_logger */ var $_logger; function SampleLogger($sample, $level) { $this->_logSample = $sample; // Load SDK settings. if (@include 'PayPal/conf/paypal-sdk.php') { if (isset($__PP_CONFIG['log_level'])) { $this->_logLevel = $__PP_CONFIG['log_level']; } if (isset($__PP_CONFIG['log_dir'])) { $this->_logDir = $__PP_CONFIG['log_dir']; } } if(isset($level)) { $this->_logLevel = $level; } $this->getLogger(); } /** * Gets the PEAR Log object to use. * * @return Log A Log object, either provided by the user or * created by this function. */ function &getLogger() { if (!$this->_logger) { $file = $this->_logDir . '/' . date('Ymd') . '.PayPalSamples.log'; if (is_link($file) || (file_exists($file) && !is_writable($file))) { // Don't overwrite symlinks. // return PayPal::raiseError('bad logfile'); } $this->_logger = &Log::singleton('file', $file, 'php_samples', array('append' => true)); } return $this->_logger; } /** * Sets a custom PEAR Log object to use in logging. * * @param Log A PEAR Log instance. */ function setLogger(&$logger) { if (is_a($logger, 'Log')) { $this->_logger =& $logger; } } /** * Log a string * * @access protected * * @param string $msg. Log this string. */ function _log($msg) { $logger =& $this->getLogger(); $clean = $this->_sanitizeLog($msg); switch ($this->_logLevel) { case PEAR_LOG_DEBUG: case PEAR_LOG_INFO: case PEAR_LOG_ERR: $logger->log('PHP Sample ' . $this->_logSample. ': ' . $clean, $this->_logLevel); } } /** * Strip sensitive information (API passwords and credit card * numbers) from log info. * * @access protected * * @param string $msg The string to sanitize. * [_password] => 12345678 [creditCardNumber] => 4489251633598686 [apiPassword] => WZPZJEKN9QQJKVPD [signature] => AeM1g39auuNZ1gPUSxogAKLX6.olAtBMuUZOiANhkYgZYaaXPHeR.9tN [_password] => WZPZJEKN9QQJKVPD [_signature] => AeM1g39auuNZ1gPUSxogAKLX6.olAtBMuUZOiANhkYgZYaaXPHeR.9tN [CreditCardNumber] => 4036390962483116 * * @return string The sanitized string. */ function _sanitizeLog($msg) { return preg_replace(array('/(\[_?password\]\s*=>) (.+)/i', '/(\[creditCardNumber\]\s*=>) (.+)/i', '/(\[apiPassword\]\s=>) (.+)/i', '/(\[CreditCardNumber\]\s*=>) (.+)/i', '/(\[_?signature\]\s*=>) (.+)/i'), '\1 **MASKED** ', $msg); $this->_log('_sanitizeLog called...'); } }
123gohelmetsv2
trunk/lib/paypal-app/SampleLogger.php
PHP
asf20
4,371
<?php require_once '../../configure/ppsdk_include_path.inc'; require_once 'PayPal.php'; require_once 'PayPal/Profile/Handler/Array.php'; require_once 'PayPal/Profile/API.php'; require_once 'PayPal/Type/AbstractResponseType.php'; require_once 'PayPal/Type/ErrorType.php'; require_once 'PayPal/Type/RefundTransactionResponseType.php'; require_once 'PayPal/Type/TransactionSearchResponseType.php'; require_once 'PayPal/Type/GetTransactionDetailsResponseType.php'; require_once 'PayPal/Type/DoDirectPaymentResponseType.php'; require_once 'PayPal/Type/SetExpressCheckoutResponseType.php'; require_once 'PayPal/Type/GetExpressCheckoutDetailsResponseDetailsType.php'; require_once 'PayPal/Type/GetExpressCheckoutDetailsResponseType.php'; require_once 'PayPal/Type/DoExpressCheckoutPaymentResponseType.php'; require_once 'PayPal/Type/DoCaptureResponseDetailsType.php'; require_once 'PayPal/Type/DoCaptureResponseType.php'; require_once 'PayPal/Type/MassPayResponseType.php'; require_once 'PayPal/Type/DoReauthorizationResponseType.php'; require_once 'PayPal/Type/DoAuthorizationResponseType.php'; require_once 'PayPal/Type/DoVoidResponseType.php'; require_once 'PayPal/Type/CreateRecurringPaymentsProfileResponseType.php'; require_once 'PayPal/Type/GetRecurringPaymentsProfileDetailsResponseType.php'; require_once 'PayPal/Type/ManageRecurringPaymentsProfileStatusResponseType.php'; require_once 'PayPal/Type/BillOutstandingAmountResponseType.php'; require_once 'PayPal/Type/GetBalanceResponseType.php'; require_once 'SampleLogger.php'; session_start(); $logger = new SampleLogger('ApiError.php', PEAR_LOG_DEBUG); $response = $_SESSION['response']; $logger->_log('SOAP response: '. print_r($response, true)); // Require AbstractResponseType.php $ack = $response->getAck(); $correlationID = $response->getCorrelationID(); $version = $response->getVersion(); // Require ErrorType.php $errorList = $response->getErrors(); // Remove the response at this point unset($_SESSION['response']); $homeURL = $_GET['HomeLink']; $homeName = $_GET['HomeLinkName']; ?> <html> <head> <title>PayPal PHP API Error</title> <link href="pages/sdk.css" rel="stylesheet" type="text/css"/> </head> <body alink=#0000FF vlink=#0000FF> <center> <br> <span id=apiheader>PayPal API Error</span> <br><br> <span id=smaller>A PayPal API has returned an error!</span><br><br> <table width="700"> <tr> <td>Ack:</td> <td><?= $ack ?></td> </tr> <tr> <td>Correlation ID:</td> <td><?= $correlationID ?></td> </tr> <tr> <td>Version:</td> <td><?= $version ?></td> </tr> <?php if(! is_array($errorList)) { $errorCode = $errorList->getErrorCode(); $shortMessage = $errorList->getShortMessage(); $longMessage = $errorList->getLongMessage(); ?> <tr> <td>Error Number:</td> <td><?= $errorCode ?></td> </tr> <tr> <td>Short Message:</td> <td><?= $shortMessage ?></td> </tr> <tr> <td>Long Message:</td> <td><?= $longMessage ?></td> </tr> <?php } else { for($n = 0; $n < sizeof($errorList); $n++) { $oneError = $errorList[$n]; $errorCode = $oneError->getErrorCode(); $shortMessage = $oneError->getShortMessage(); $longMessage = $oneError->getLongMessage(); ?> <tr> <td>Error Number:</td> <td><?= $errorCode ?></td> </tr> <tr> <td>Short Message:</td> <td><?= $shortMessage ?></td> </tr> <tr> <td>Long Message:</td> <td><?= $longMessage ?></td> </tr> <?php } // for } // if ?> </table> </center> <?php if($homeURL != null) { ?> <a id="CallsLink" href="<?php echo $homeURL ?>"><?php echo $homeName ?></a> <?php } else { ?> <!--<a id="CallsLink" href="Calls.html">Home</a>--> <?php } ?> </body> </html>
123gohelmetsv2
trunk/lib/paypal-app/ApiError.php
PHP
asf20
3,868
<?php /** * * * */ class ImageUtils { /** * * * @param $filename * @param $w * @param $h * @param $override * @param $background * @param $color */ public function RatioAdjuct($filename = '', $w = 440, $h = 300, $override = null, $background = null, $color = '0xFFFFFF') { list ( $imgWidth, $imgHeight ) = getImageSize ( $filename ); $ratioX = $imgWidth / $w; $ratioY = $imgHeight / $h; if ($ratioX > $ratioY || $ratioX == $ratioY) { $dst_w = $w; $dst_h = ceil ( $imgHeight / $ratioX ); } else if ($ratioY > $ratioX) { $dst_h = $h; $dst_w = ceil ( $imgWidth / $ratioY ); } // switch (strtolower ( strrchr ( $filename, '.' ) )) { case '.jpg' : case '.jpeg' : $im = imageCreateFromJpeg ( $filename ); break; case '.gif' : $im = imageCreateFromGif ( $filename ); break; case '.png' : $im = imageCreateFromPng ( $filename ); } // if (null !== $background) { // $dec = hexdec ( $color ); $red = 0xFF & ($dec >> 0x10); $green = 0xFF & ($dec >> 0x8); $blue = 0xFF & $dec; // $dst_pos = array ('d_x' => 0, 'd_y' => 0 ); ($dst_w == $w) ? ($dst_pos ['d_y'] = (($h - $dst_h) / 2)) : ($dst_pos ['d_x'] = (($w - $dst_w) / 2)); $imBox = imageCreateTrueColor ( $w, $h ); $color_bg = imageColorAllocate ( $imBox, $red, $green, $blue ); imageFill ( $imBox, 0, 0, $color_bg ); imageCopyResized ( $imBox, $im, $dst_pos ['d_x'], $dst_pos ['d_y'], 0, 0, $dst_w, $dst_h, $imgWidth, $imgHeight ); } else { $imBox = imageCreateTrueColor ( $dst_w, $dst_h ); imageCopyResized ( $imBox, $im, 0, 0, 0, 0, $dst_w, $dst_h, $imgWidth, $imgHeight ); } // if (null === $override) $filename = str_replace ( strrchr ( $filename, '.' ), '', $filename ) . '_thumb.png'; return imagejpeg ( $imBox, $filename ) ? $filename : false; } } ?>
123gohelmetsv2
trunk/lib/ImageUtils.php
PHP
asf20
1,952
<?php /* * Created on Nov 10, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ class Password { function Password() { } // This funstion validates a plain text password with an // encrpyted password public function validate($plain, $encrypted) { if (!empty($plain) && !empty($encrypted)) { // split apart the hash / salt $stack = explode(':', $encrypted); if (sizeof($stack) != 2) return false; if (md5($stack[1] . $plain) == $stack[0]) { return true; } } return false; } // This function makes a new password from a plaintext password. public function encrypt($plain) { $password = ''; for ($i=0; $i<10; $i++) { $password .= $this->rand(); } $salt = substr(md5($password), 0, 2); $password = md5($salt . $plain) . ':' . $salt; return $password; } public function rand($min = null, $max = null) { static $seeded; if (!$seeded) { mt_srand((double)microtime()*1000000); $seeded = true; } if (isset($min) && isset($max)) { if ($min >= $max) { return $min; } else { return mt_rand($min, $max); } } else { return mt_rand(); } } function getRandomValue($length, $type = 'mixed') { if ( ($type != 'mixed') && ($type != 'chars') && ($type != 'digits')) return false; $rand_value = ''; while (strlen($rand_value) < $length) { if ($type == 'digits') { $char = rand(0, 9); } else { $char = chr(rand(0, 255)); } if ($type == 'mixed') { if (eregi('^[a-z0-9]$', $char)) $rand_value .= $char; } elseif ($type == 'chars') { if (eregi('^[a-z]$', $char)) $rand_value .= $char; } elseif ($type == 'digits') { if (ereg('^[0-9]$', $char)) $rand_value .= $char; } } return $rand_value; } } ?>
123gohelmetsv2
trunk/lib/Password.php
PHP
asf20
2,199
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/syslog.php,v 1.1 2011/09/18 05:16:07 iling Exp $ * $Horde: horde/lib/Log/syslog.php,v 1.6 2000/06/28 21:36:13 jon Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** * The Log_syslog class is a concrete implementation of the Log:: * abstract class which sends messages to syslog on UNIX-like machines * (PHP emulates this with the Event Log on Windows machines). * * @author Chuck Hagenbuch <chuck@horde.org> * @since Horde 1.3 * @since Log 1.0 * @package Log * * @example syslog.php Using the syslog handler. */ class Log_syslog extends Log { /** * Integer holding the log facility to use. * @var string * @access private */ var $_name = LOG_SYSLOG; /** * Constructs a new syslog object. * * @param string $name The syslog facility. * @param string $ident The identity string. * @param array $conf The configuration array. * @param int $level Log messages up to and including this level. * @access public */ function Log_syslog($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { /* Ensure we have a valid integer value for $name. */ if (empty($name) || !is_int($name)) { $name = LOG_SYSLOG; } $this->_id = md5(microtime()); $this->_name = $name; $this->_ident = $ident; $this->_mask = Log::UPTO($level); } /** * Opens a connection to the system logger, if it has not already * been opened. This is implicitly called by log(), if necessary. * @access public */ function open() { if (!$this->_opened) { openlog($this->_ident, LOG_PID, $this->_name); $this->_opened = true; } return $this->_opened; } /** * Closes the connection to the system logger, if it is open. * @access public */ function close() { if ($this->_opened) { closelog(); $this->_opened = false; } return ($this->_opened === false); } /** * Sends $message to the currently open syslog connection. Calls * open() if necessary. Also passes the message along to any Log_observer * instances that are observing this Log. * * @param mixed $message String or object containing the message to log. * @param int $priority (optional) The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } /* If the connection isn't open and can't be opened, return failure. */ if (!$this->_opened && !$this->open()) { return false; } /* Extract the string representation of the message. */ $message = $this->_extractMessage($message); if (!syslog($this->_toSyslog($priority), $message)) { return false; } $this->_announce(array('priority' => $priority, 'message' => $message)); return true; } /** * Converts a PEAR_LOG_* constant into a syslog LOG_* constant. * * This function exists because, under Windows, not all of the LOG_* * constants have unique values. Instead, the PEAR_LOG_* were introduced * for global use, with the conversion to the LOG_* constants kept local to * to the syslog driver. * * @param int $priority PEAR_LOG_* value to convert to LOG_* value. * * @return The LOG_* representation of $priority. * * @access private */ function _toSyslog($priority) { static $priorities = array( PEAR_LOG_EMERG => LOG_EMERG, PEAR_LOG_ALERT => LOG_ALERT, PEAR_LOG_CRIT => LOG_CRIT, PEAR_LOG_ERR => LOG_ERR, PEAR_LOG_WARNING => LOG_WARNING, PEAR_LOG_NOTICE => LOG_NOTICE, PEAR_LOG_INFO => LOG_INFO, PEAR_LOG_DEBUG => LOG_DEBUG ); /* If we're passed an unknown priority, default to LOG_INFO. */ if (!is_int($priority) || !in_array($priority, $priorities)) { return LOG_INFO; } return $priorities[$priority]; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/syslog.php
PHP
asf20
5,055
<?php // $Id: daemon.php,v 1.1 2011/09/18 05:16:07 iling Exp $ /** * The Log_daemon class is a concrete implementation of the Log:: * abstract class which sends messages to syslog daemon on UNIX-like machines. * This class uses the syslog protocol: http://www.ietf.org/rfc/rfc3164.txt * * @author Bart van der Schans <schans@dds.nl> * @version $Revision: 1.1 $ * @package Log */ class Log_daemon extends Log { /** * Integer holding the log facility to use. * @var string */ var $_name = LOG_DAEMON; /** * Var holding the resource pointer to the socket * @var resource */ var $_socket; /** * The ip address or servername * @see http://www.php.net/manual/en/transports.php * @var string */ var $_ip = '127.0.0.1'; /** * Protocol to use (tcp, udp, etc.) * @see http://www.php.net/manual/en/transports.php * @var string */ var $_proto = 'udp'; /** * Port to connect to * @var int */ var $_port = 514; /** * Maximum message length in bytes * @var int */ var $_maxsize = 4096; /** * Socket timeout in seconds * @var int */ var $_timeout = 1; /** * Constructs a new syslog object. * * @param string $name The syslog facility. * @param string $ident The identity string. * @param array $conf The configuration array. * @param int $maxLevel Maximum level at which to log. * @access public */ function Log_daemon($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { /* Ensure we have a valid integer value for $name. */ if (empty($name) || !is_int($name)) { $name = LOG_SYSLOG; } $this->_id = md5(microtime()); $this->_name = $name; $this->_ident = $ident; $this->_mask = Log::UPTO($level); if (isset($conf['ip'])) { $this->_ip = $conf['ip']; } if (isset($conf['proto'])) { $this->_proto = $conf['proto']; } if (isset($conf['port'])) { $this->_port = $conf['port']; } if (isset($conf['maxsize'])) { $this->_maxsize = $conf['maxsize']; } if (isset($conf['timeout'])) { $this->_timeout = $conf['timeout']; } $this->_proto = $this->_proto . '://'; register_shutdown_function(array(&$this, '_Log_daemon')); } /** * Destructor. * * @access private */ function _Log_daemon() { $this->close(); } /** * Opens a connection to the system logger, if it has not already * been opened. This is implicitly called by log(), if necessary. * @access public */ function open() { if (!$this->_opened) { $this->_opened = (bool)($this->_socket = @fsockopen( $this->_proto . $this->_ip, $this->_port, $errno, $errstr, $this->_timeout)); } return $this->_opened; } /** * Closes the connection to the system logger, if it is open. * @access public */ function close() { if ($this->_opened) { $this->_opened = false; return fclose($this->_socket); } return true; } /** * Sends $message to the currently open syslog connection. Calls * open() if necessary. Also passes the message along to any Log_observer * instances that are observing this Log. * * @param string $message The textual message to be logged. * @param int $priority (optional) The priority of the message. Valid * values are: LOG_EMERG, LOG_ALERT, LOG_CRIT, * LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, * and LOG_DEBUG. The default is LOG_INFO. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } /* If the connection isn't open and can't be opened, return failure. */ if (!$this->_opened && !$this->open()) { return false; } /* Extract the string representation of the message. */ $message = $this->_extractMessage($message); /* Set the facility level. */ $facility_level = intval($this->_name) + intval($this->_toSyslog($priority)); /* Prepend ident info. */ if (!empty($this->_ident)) { $message = $this->_ident . ' ' . $message; } /* Check for message length. */ if (strlen($message) > $this->_maxsize) { $message = substr($message, 0, ($this->_maxsize) - 10) . ' [...]'; } /* Write to socket. */ fwrite($this->_socket, '<' . $facility_level . '>' . $message . "\n"); $this->_announce(array('priority' => $priority, 'message' => $message)); } /** * Converts a PEAR_LOG_* constant into a syslog LOG_* constant. * * This function exists because, under Windows, not all of the LOG_* * constants have unique values. Instead, the PEAR_LOG_* were introduced * for global use, with the conversion to the LOG_* constants kept local to * to the syslog driver. * * @param int $priority PEAR_LOG_* value to convert to LOG_* value. * * @return The LOG_* representation of $priority. * * @access private */ function _toSyslog($priority) { static $priorities = array( PEAR_LOG_EMERG => LOG_EMERG, PEAR_LOG_ALERT => LOG_ALERT, PEAR_LOG_CRIT => LOG_CRIT, PEAR_LOG_ERR => LOG_ERR, PEAR_LOG_WARNING => LOG_WARNING, PEAR_LOG_NOTICE => LOG_NOTICE, PEAR_LOG_INFO => LOG_INFO, PEAR_LOG_DEBUG => LOG_DEBUG ); /* If we're passed an unknown priority, default to LOG_INFO. */ if (!is_int($priority) || !in_array($priority, $priorities)) { return LOG_INFO; } return $priorities[$priority]; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/daemon.php
PHP
asf20
6,911
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/composite.php,v 1.1 2011/09/18 05:16:06 iling Exp $ * $Horde: horde/lib/Log/composite.php,v 1.2 2000/06/28 21:36:13 jon Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** * The Log_composite:: class implements a Composite pattern which * allows multiple Log implementations to receive the same events. * * @author Chuck Hagenbuch <chuck@horde.org> * @author Jon Parise <jon@php.net> * * @since Horde 1.3 * @since Log 1.0 * @package Log * * @example composite.php Using the composite handler. */ class Log_composite extends Log { /** * Array holding all of the Log instances to which log events should be * sent. * * @var array * @access private */ var $_children = array(); /** * Constructs a new composite Log object. * * @param boolean $name This parameter is ignored. * @param boolean $ident This parameter is ignored. * @param boolean $conf This parameter is ignored. * @param boolean $level This parameter is ignored. * * @access public */ function Log_composite($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { $this->_ident = $ident; } /** * Opens the child connections. * * @access public */ function open() { if (!$this->_opened) { foreach ($this->_children as $id => $child) { $this->_children[$id]->open(); } $this->_opened = true; } } /** * Closes any child instances. * * @access public */ function close() { if ($this->_opened) { foreach ($this->_children as $id => $child) { $this->_children[$id]->close(); } $this->_opened = false; } } /** * Flushes all open child instances. * * @access public * @since Log 1.8.2 */ function flush() { if ($this->_opened) { foreach ($this->_children as $id => $child) { $this->_children[$id]->flush(); } } } /** * Sends $message and $priority to each child of this composite. * * @param mixed $message String or object containing the message * to log. * @param string $priority (optional) The priority of the message. * Valid values are: PEAR_LOG_EMERG, * PEAR_LOG_ALERT, PEAR_LOG_CRIT, * PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and * PEAR_LOG_DEBUG. * * @return boolean True if the entry is successfully logged. * * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } foreach ($this->_children as $id => $child) { $this->_children[$id]->log($message, $priority); } $this->_announce(array('priority' => $priority, 'message' => $message)); return true; } /** * Returns true if this is a composite. * * @return boolean True if this is a composite class. * * @access public */ function isComposite() { return true; } /** * Sets this identification string for all of this composite's children. * * @param string $ident The new identification string. * * @access public * @since Log 1.6.7 */ function setIdent($ident) { /* Call our base class's setIdent() method. */ parent::setIdent($ident); /* ... and then call setIdent() on all of our children. */ foreach ($this->_children as $id => $child) { $this->_children[$id]->setIdent($ident); } } /** * Adds a Log instance to the list of children. * * @param object $child The Log instance to add. * * @return boolean True if the Log instance was successfully added. * * @access public */ function addChild(&$child) { /* Make sure this is a Log instance. */ if (!is_a($child, 'Log')) { return false; } $this->_children[$child->_id] = &$child; return true; } /** * Removes a Log instance from the list of children. * * @param object $child The Log instance to remove. * * @return boolean True if the Log instance was successfully removed. * * @access public */ function removeChild($child) { if (!is_a($child, 'Log') || !isset($this->_children[$child->_id])) { return false; } unset($this->_children[$child->_id]); return true; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/composite.php
PHP
asf20
5,334
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/mdb2.php,v 1.1 2011/09/18 05:16:07 iling Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** PEAR's MDB2 package */ require_once 'MDB2.php'; MDB2::loadFile('Date'); /** * The Log_mdb2 class is a concrete implementation of the Log:: abstract class * which sends messages to an SQL server. Each entry occupies a separate row * in the database. * * This implementation uses PEAR's MDB2 database abstraction layer. * * CREATE TABLE log_table ( * id INT NOT NULL, * logtime TIMESTAMP NOT NULL, * ident CHAR(16) NOT NULL, * priority INT NOT NULL, * message VARCHAR(200), * PRIMARY KEY (id) * ); * * @author Lukas Smith <smith@backendmedia.com> * @author Jon Parise <jon@php.net> * @since Log 1.9.0 * @package Log */ class Log_mdb2 extends Log { /** * Variable containing the DSN information. * @var mixed * @access private */ var $_dsn = ''; /** * Array containing our set of DB configuration options. * @var array * @access private */ var $_options = array('persistent' => true); /** * Object holding the database handle. * @var object * @access private */ var $_db = null; /** * Resource holding the prepared statement handle. * @var resource * @access private */ var $_statement = null; /** * Flag indicating that we're using an existing database connection. * @var boolean * @access private */ var $_existingConnection = false; /** * String holding the database table to use. * @var string * @access private */ var $_table = 'log_table'; /** * String holding the name of the ID sequence. * @var string * @access private */ var $_sequence = 'log_id'; /** * Maximum length of the $ident string. This corresponds to the size of * the 'ident' column in the SQL table. * @var integer * @access private */ var $_identLimit = 16; /** * Set of field types used in the database table. * @var array * @access private */ var $_types = array( 'id' => 'integer', 'logtime' => 'timestamp', 'ident' => 'text', 'priority' => 'text', 'message' => 'clob' ); /** * Constructs a new sql logging object. * * @param string $name The target SQL table. * @param string $ident The identification field. * @param array $conf The connection configuration array. * @param int $level Log messages up to and including this level. * @access public */ function Log_mdb2($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { $this->_id = md5(microtime()); $this->_table = $name; $this->_mask = Log::UPTO($level); /* If an options array was provided, use it. */ if (isset($conf['options']) && is_array($conf['options'])) { $this->_options = $conf['options']; } /* If a specific sequence name was provided, use it. */ if (!empty($conf['sequence'])) { $this->_sequence = $conf['sequence']; } /* If a specific sequence name was provided, use it. */ if (isset($conf['identLimit'])) { $this->_identLimit = $conf['identLimit']; } /* Now that the ident limit is confirmed, set the ident string. */ $this->setIdent($ident); /* If an existing database connection was provided, use it. */ if (isset($conf['db'])) { $this->_db = &$conf['db']; $this->_existingConnection = true; $this->_opened = true; } elseif (isset($conf['singleton'])) { $this->_db = &MDB2::singleton($conf['singleton'], $this->_options); $this->_existingConnection = true; $this->_opened = true; } else { $this->_dsn = $conf['dsn']; } } /** * Opens a connection to the database, if it has not already * been opened. This is implicitly called by log(), if necessary. * * @return boolean True on success, false on failure. * @access public */ function open() { if (!$this->_opened) { /* Use the DSN and options to create a database connection. */ $this->_db = &MDB2::connect($this->_dsn, $this->_options); if (PEAR::isError($this->_db)) { return false; } /* Create a prepared statement for repeated use in log(). */ if (!$this->_prepareStatement()) { return false; } /* We now consider out connection open. */ $this->_opened = true; } return $this->_opened; } /** * Closes the connection to the database if it is still open and we were * the ones that opened it. It is the caller's responsible to close an * existing connection that was passed to us via $conf['db']. * * @return boolean True on success, false on failure. * @access public */ function close() { /* If we have a statement object, free it. */ if (is_object($this->_statement)) { $this->_statement->free(); $this->_statement = null; } /* If we opened the database connection, disconnect it. */ if ($this->_opened && !$this->_existingConnection) { $this->_opened = false; return $this->_db->disconnect(); } return ($this->_opened === false); } /** * Sets this Log instance's identification string. Note that this * SQL-specific implementation will limit the length of the $ident string * to sixteen (16) characters. * * @param string $ident The new identification string. * * @access public * @since Log 1.8.5 */ function setIdent($ident) { $this->_ident = substr($ident, 0, $this->_identLimit); } /** * Inserts $message to the currently open database. Calls open(), * if necessary. Also passes the message along to any Log_observer * instances that are observing this Log. * * @param mixed $message String or object containing the message to log. * @param string $priority The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } /* If the connection isn't open and can't be opened, return failure. */ if (!$this->_opened && !$this->open()) { return false; } /* If we don't already have a statement object, create one. */ if (!is_object($this->_statement) && !$this->_prepareStatement()) { return false; } /* Extract the string representation of the message. */ $message = $this->_extractMessage($message); /* Build our set of values for this log entry. */ $values = array( 'id' => $this->_db->nextId($this->_sequence), 'logtime' => MDB2_Date::mdbNow(), 'ident' => $this->_ident, 'priority' => $priority, 'message' => $message ); /* Execute the SQL query for this log entry insertion. */ $this->_db->expectError(MDB2_ERROR_NOSUCHTABLE); $result = &$this->_statement->execute($values); $this->_db->popExpect(); /* Attempt to handle any errors. */ if (PEAR::isError($result)) { /* We can only handle MDB2_ERROR_NOSUCHTABLE errors. */ if ($result->getCode() != MDB2_ERROR_NOSUCHTABLE) { return false; } /* Attempt to create the target table. */ if (!$this->_createTable()) { return false; } /* Recreate our prepared statement resource. */ $this->_statement->free(); if (!$this->_prepareStatement()) { return false; } /* Attempt to re-execute the insertion query. */ $result = $this->_statement->execute($values); if (PEAR::isError($result)) { return false; } } $this->_announce(array('priority' => $priority, 'message' => $message)); return true; } /** * Create the log table in the database. * * @return boolean True on success or false on failure. * @access private */ function _createTable() { $this->_db->loadModule('Manager'); $result = $this->_db->manager->createTable( $this->_table, array( 'id' => array('type' => $this->_types['id']), 'logtime' => array('type' => $this->_types['logtime']), 'ident' => array('type' => $this->_types['ident']), 'priority' => array('type' => $this->_types['priority']), 'message' => array('type' => $this->_types['message']) ) ); if (PEAR::isError($result)) { return false; } $result = $this->_db->manager->createIndex( $this->_table, 'unique_id', array('fields' => array('id' => true), 'unique' => true) ); if (PEAR::isError($result)) { return false; } return true; } /** * Prepare the SQL insertion statement. * * @return boolean True if the statement was successfully created. * * @access private * @since Log 1.9.0 */ function _prepareStatement() { $this->_statement = &$this->_db->prepare( 'INSERT INTO ' . $this->_table . ' (id, logtime, ident, priority, message)' . ' VALUES(:id, :logtime, :ident, :priority, :message)', $this->_types); /* Return success if we didn't generate an error. */ return (PEAR::isError($this->_statement) === false); } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/mdb2.php
PHP
asf20
11,214
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/file.php,v 1.1 2011/09/18 05:16:07 iling Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** * The Log_file class is a concrete implementation of the Log abstract * class that logs messages to a text file. * * @author Jon Parise <jon@php.net> * @author Roman Neuhauser <neuhauser@bellavista.cz> * @since Log 1.0 * @package Log * * @example file.php Using the file handler. */ class Log_file extends Log { /** * String containing the name of the log file. * @var string * @access private */ var $_filename = 'php.log'; /** * Handle to the log file. * @var resource * @access private */ var $_fp = false; /** * Should new log entries be append to an existing log file, or should the * a new log file overwrite an existing one? * @var boolean * @access private */ var $_append = true; /** * Should advisory file locking (i.e., flock()) be used? * @var boolean * @access private */ var $_locking = false; /** * Integer (in octal) containing the log file's permissions mode. * @var integer * @access private */ var $_mode = 0644; /** * Integer (in octal) specifying the file permission mode that will be * used when creating directories that do not already exist. * @var integer * @access private */ var $_dirmode = 0755; /** * String containing the format of a log line. * @var string * @access private */ var $_lineFormat = '%1$s %2$s [%3$s] %4$s'; /** * String containing the timestamp format. It will be passed directly to * strftime(). Note that the timestamp string will generated using the * current locale. * @var string * @access private */ var $_timeFormat = '%b %d %H:%M:%S'; /** * Hash that maps canonical format keys to position arguments for the * "line format" string. * @var array * @access private */ var $_formatMap = array('%{timestamp}' => '%1$s', '%{ident}' => '%2$s', '%{priority}' => '%3$s', '%{message}' => '%4$s', '%\{' => '%%{'); /** * String containing the end-on-line character sequence. * @var string * @access private */ var $_eol = "\n"; /** * Constructs a new Log_file object. * * @param string $name Ignored. * @param string $ident The identity string. * @param array $conf The configuration array. * @param int $level Log messages up to and including this level. * @access public */ function Log_file($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { $this->_id = md5(microtime()); $this->_filename = $name; $this->_ident = $ident; $this->_mask = Log::UPTO($level); if (isset($conf['append'])) { $this->_append = $conf['append']; } if (isset($conf['locking'])) { $this->_locking = $conf['locking']; } if (!empty($conf['mode'])) { if (is_string($conf['mode'])) { $this->_mode = octdec($conf['mode']); } else { $this->_mode = $conf['mode']; } } if (!empty($conf['dirmode'])) { if (is_string($conf['dirmode'])) { $this->_dirmode = octdec($conf['dirmode']); } else { $this->_dirmode = $conf['dirmode']; } } if (!empty($conf['lineFormat'])) { $this->_lineFormat = str_replace(array_keys($this->_formatMap), array_values($this->_formatMap), $conf['lineFormat']); } if (!empty($conf['timeFormat'])) { $this->_timeFormat = $conf['timeFormat']; } if (!empty($conf['eol'])) { $this->_eol = $conf['eol']; } else { $this->_eol = (strstr(PHP_OS, 'WIN')) ? "\r\n" : "\n"; } register_shutdown_function(array(&$this, '_Log_file')); } /** * Destructor */ function _Log_file() { if ($this->_opened) { $this->close(); } } /** * Creates the given directory path. If the parent directories don't * already exist, they will be created, too. * * This implementation is inspired by Python's os.makedirs function. * * @param string $path The full directory path to create. * @param integer $mode The permissions mode with which the * directories will be created. * * @return True if the full path is successfully created or already * exists. * * @access private */ function _mkpath($path, $mode = 0700) { /* Separate the last pathname component from the rest of the path. */ $head = dirname($path); $tail = basename($path); /* Make sure we've split the path into two complete components. */ if (empty($tail)) { $head = dirname($path); $tail = basename($path); } /* Recurse up the path if our current segment does not exist. */ if (!empty($head) && !empty($tail) && !is_dir($head)) { $this->_mkpath($head, $mode); } /* Create this segment of the path. */ return @mkdir($head, $mode); } /** * Opens the log file for output. If the specified log file does not * already exist, it will be created. By default, new log entries are * appended to the end of the log file. * * This is implicitly called by log(), if necessary. * * @access public */ function open() { if (!$this->_opened) { /* If the log file's directory doesn't exist, create it. */ if (!is_dir(dirname($this->_filename))) { $this->_mkpath($this->_filename, $this->_dirmode); } /* Determine whether the log file needs to be created. */ $creating = !file_exists($this->_filename); /* Obtain a handle to the log file. */ $this->_fp = fopen($this->_filename, ($this->_append) ? 'a' : 'w'); /* We consider the file "opened" if we have a valid file pointer. */ $this->_opened = ($this->_fp !== false); /* Attempt to set the file's permissions if we just created it. */ if ($creating && $this->_opened) { chmod($this->_filename, $this->_mode); } } return $this->_opened; } /** * Closes the log file if it is open. * * @access public */ function close() { /* If the log file is open, close it. */ if ($this->_opened && fclose($this->_fp)) { $this->_opened = false; } return ($this->_opened === false); } /** * Flushes all pending data to the file handle. * * @access public * @since Log 1.8.2 */ function flush() { return fflush($this->_fp); } /** * Logs $message to the output window. The message is also passed along * to any Log_observer instances that are observing this Log. * * @param mixed $message String or object containing the message to log. * @param string $priority The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } /* If the log file isn't already open, open it now. */ if (!$this->_opened && !$this->open()) { return false; } /* Extract the string representation of the message. */ $message = $this->_extractMessage($message); /* Build the string containing the complete log line. */ $line = sprintf($this->_lineFormat, strftime($this->_timeFormat), $this->_ident, $this->priorityToString($priority), $message) . $this->_eol; /* If locking is enabled, acquire an exclusive lock on the file. */ if ($this->_locking) { flock($this->_fp, LOCK_EX); } /* Write the log line to the log file. */ $success = (fwrite($this->_fp, $line) !== false); /* Unlock the file now that we're finished writing to it. */ if ($this->_locking) { flock($this->_fp, LOCK_UN); } /* Notify observers about this log message. */ $this->_announce(array('priority' => $priority, 'message' => $message)); return $success; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/file.php
PHP
asf20
9,859
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/sqlite.php,v 1.1 2011/09/18 05:16:07 iling Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** * The Log_sqlite class is a concrete implementation of the Log:: * abstract class which sends messages to an Sqlite database. * Each entry occupies a separate row in the database. * * This implementation uses PHP native Sqlite functions. * * CREATE TABLE log_table ( * id INTEGER PRIMARY KEY NOT NULL, * logtime NOT NULL, * ident CHAR(16) NOT NULL, * priority INT NOT NULL, * message * ); * * @author Bertrand Mansion <bmansion@mamasam.com> * @author Jon Parise <jon@php.net> * @since Log 1.8.3 * @package Log * * @example sqlite.php Using the Sqlite handler. */ class Log_sqlite extends Log { /** * Array containing the connection defaults * @var array * @access private */ var $_options = array('mode' => 0666, 'persistent' => false); /** * Object holding the database handle. * @var object * @access private */ var $_db = null; /** * Flag indicating that we're using an existing database connection. * @var boolean * @access private */ var $_existingConnection = false; /** * String holding the database table to use. * @var string * @access private */ var $_table = 'log_table'; /** * Constructs a new sql logging object. * * @param string $name The target SQL table. * @param string $ident The identification field. * @param mixed $conf Can be an array of configuration options used * to open a new database connection * or an already opened sqlite connection. * @param int $level Log messages up to and including this level. * @access public */ function Log_sqlite($name, $ident = '', &$conf, $level = PEAR_LOG_DEBUG) { $this->_id = md5(microtime()); $this->_table = $name; $this->_ident = $ident; $this->_mask = Log::UPTO($level); if (is_array($conf)) { foreach ($conf as $k => $opt) { $this->_options[$k] = $opt; } } else { // If an existing database connection was provided, use it. $this->_db =& $conf; $this->_existingConnection = true; } } /** * Opens a connection to the database, if it has not already * been opened. This is implicitly called by log(), if necessary. * * @return boolean True on success, false on failure. * @access public */ function open() { if (is_resource($this->_db)) { $this->_opened = true; return $this->_createTable(); } else { /* Set the connection function based on the 'persistent' option. */ if (empty($this->_options['persistent'])) { $connectFunction = 'sqlite_open'; } else { $connectFunction = 'sqlite_popen'; } /* Attempt to connect to the database. */ if ($this->_db = $connectFunction($this->_options['filename'], (int)$this->_options['mode'], $error)) { $this->_opened = true; return $this->_createTable(); } } return $this->_opened; } /** * Closes the connection to the database if it is still open and we were * the ones that opened it. It is the caller's responsible to close an * existing connection that was passed to us via $conf['db']. * * @return boolean True on success, false on failure. * @access public */ function close() { /* We never close existing connections. */ if ($this->_existingConnection) { return false; } if ($this->_opened) { $this->_opened = false; sqlite_close($this->_db); } return ($this->_opened === false); } /** * Inserts $message to the currently open database. Calls open(), * if necessary. Also passes the message along to any Log_observer * instances that are observing this Log. * * @param mixed $message String or object containing the message to log. * @param string $priority The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } /* If the connection isn't open and can't be opened, return failure. */ if (!$this->_opened && !$this->open()) { return false; } // Extract the string representation of the message. $message = $this->_extractMessage($message); // Build the SQL query for this log entry insertion. $q = sprintf('INSERT INTO [%s] (logtime, ident, priority, message) ' . "VALUES ('%s', '%s', %d, '%s')", $this->_table, strftime('%Y-%m-%d %H:%M:%S', time()), sqlite_escape_string($this->_ident), $priority, sqlite_escape_string($message)); if (!($res = @sqlite_unbuffered_query($this->_db, $q))) { return false; } $this->_announce(array('priority' => $priority, 'message' => $message)); return true; } /** * Checks whether the log table exists and creates it if necessary. * * @return boolean True on success or false on failure. * @access private */ function _createTable() { $q = "SELECT name FROM sqlite_master WHERE name='" . $this->_table . "' AND type='table'"; $res = sqlite_query($this->_db, $q); if (sqlite_num_rows($res) == 0) { $q = 'CREATE TABLE [' . $this->_table . '] (' . 'id INTEGER PRIMARY KEY NOT NULL, ' . 'logtime NOT NULL, ' . 'ident CHAR(16) NOT NULL, ' . 'priority INT NOT NULL, ' . 'message)'; if (!($res = sqlite_unbuffered_query($this->_db, $q))) { return false; } } return true; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/sqlite.php
PHP
asf20
7,276
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/error_log.php,v 1.1 2011/09/18 05:16:06 iling Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** * The Log_error_log class is a concrete implementation of the Log abstract * class that logs messages using PHP's error_log() function. * * @author Jon Parise <jon@php.net> * @since Log 1.7.0 * @package Log * * @example error_log.php Using the error_log handler. */ class Log_error_log extends Log { /** * The error_log() log type. * @var integer * @access private */ var $_type = PEAR_LOG_TYPE_SYSTEM; /** * The type-specific destination value. * @var string * @access private */ var $_destination = ''; /** * Additional headers to pass to the mail() function when the * PEAR_LOG_TYPE_MAIL type is used. * @var string * @access private */ var $_extra_headers = ''; /** * Constructs a new Log_error_log object. * * @param string $name Ignored. * @param string $ident The identity string. * @param array $conf The configuration array. * @param int $level Log messages up to and including this level. * @access public */ function Log_error_log($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { $this->_id = md5(microtime()); $this->_type = $name; $this->_ident = $ident; $this->_mask = Log::UPTO($level); if (!empty($conf['destination'])) { $this->_destination = $conf['destination']; } if (!empty($conf['extra_headers'])) { $this->_extra_headers = $conf['extra_headers']; } } /** * Logs $message using PHP's error_log() function. The message is also * passed along to any Log_observer instances that are observing this Log. * * @param mixed $message String or object containing the message to log. * @param string $priority The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } /* Extract the string representation of the message. */ $message = $this->_extractMessage($message); $success = error_log($this->_ident . ': ' . $message, $this->_type, $this->_destination, $this->_extra_headers); $this->_announce(array('priority' => $priority, 'message' => $message)); return $success; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/error_log.php
PHP
asf20
3,247
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/observer.php,v 1.1 2011/09/18 05:16:06 iling Exp $ * $Horde: horde/lib/Log/observer.php,v 1.5 2000/06/28 21:36:13 jon Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** * The Log_observer:: class implements the Observer end of a Subject-Observer * pattern for watching log activity and taking actions on exceptional events. * * @author Chuck Hagenbuch <chuck@horde.org> * @since Horde 1.3 * @since Log 1.0 * @package Log * * @example observer_mail.php An example Log_observer implementation. */ class Log_observer { /** * Instance-specific unique identification number. * * @var integer * @access private */ var $_id = 0; /** * The minimum priority level of message that we want to hear about. * PEAR_LOG_EMERG is the highest priority, so we will only hear messages * with an integer priority value less than or equal to ours. It defaults * to PEAR_LOG_INFO, which listens to everything except PEAR_LOG_DEBUG. * * @var string * @access private */ var $_priority = PEAR_LOG_INFO; /** * Creates a new basic Log_observer instance. * * @param integer $priority The highest priority at which to receive * log event notifications. * * @access public */ function Log_observer($priority = PEAR_LOG_INFO) { $this->_id = md5(microtime()); $this->_priority = $priority; } /** * Attempts to return a new concrete Log_observer instance of the requested * type. * * @param string $type The type of concreate Log_observer subclass * to return. * @param integer $priority The highest priority at which to receive * log event notifications. * @param array $conf Optional associative array of additional * configuration values. * * @return object The newly created concrete Log_observer * instance, or null on an error. */ function &factory($type, $priority = PEAR_LOG_INFO, $conf = array()) { $type = strtolower($type); $class = 'Log_observer_' . $type; /* Support both the new-style and old-style file naming conventions. */ if (file_exists(dirname(__FILE__) . '/observer_' . $type . '.php')) { $classfile = 'Log/observer_' . $type . '.php'; $newstyle = true; } else { $classfile = 'Log/' . $type . '.php'; $newstyle = false; } /* Issue a warning if the old-style conventions are being used. */ if (!$newstyle) { trigger_error('Using old-style Log_observer conventions', E_USER_WARNING); } /* * Attempt to include our version of the named class, but don't treat * a failure as fatal. The caller may have already included their own * version of the named class. */ @include_once $classfile; /* If the class exists, return a new instance of it. */ if (class_exists($class)) { /* Support both new-style and old-style construction. */ if ($newstyle) { $object =& new $class($priority, $conf); } else { $object =& new $class($priority); } return $object; } return null; } /** * This is a stub method to make sure that Log_Observer classes do * something when they are notified of a message. The default behavior * is to just print the message, which is obviously not desireable in * practically any situation - which is why you need to override this * method. :) * * @param array $event A hash describing the log event. */ function notify($event) { print_r($event); } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/observer.php
PHP
asf20
4,216
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/win.php,v 1.1 2011/09/18 05:16:06 iling Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** * The Log_win class is a concrete implementation of the Log abstract * class that logs messages to a separate browser window. * * The concept for this log handler is based on part by Craig Davis' article * entitled "JavaScript Power PHP Debugging: * * http://www.zend.com/zend/tut/tutorial-DebugLib.php * * @author Jon Parise <jon@php.net> * @since Log 1.7.0 * @package Log * * @example win.php Using the window handler. */ class Log_win extends Log { /** * The name of the output window. * @var string * @access private */ var $_name = 'LogWindow'; /** * The title of the output window. * @var string * @access private */ var $_title = 'Log Output Window'; /** * Mapping of log priorities to colors. * @var array * @access private */ var $_colors = array( PEAR_LOG_EMERG => 'red', PEAR_LOG_ALERT => 'orange', PEAR_LOG_CRIT => 'yellow', PEAR_LOG_ERR => 'green', PEAR_LOG_WARNING => 'blue', PEAR_LOG_NOTICE => 'indigo', PEAR_LOG_INFO => 'violet', PEAR_LOG_DEBUG => 'black' ); /** * String buffer that holds line that are pending output. * @var array * @access private */ var $_buffer = array(); /** * Constructs a new Log_win object. * * @param string $name Ignored. * @param string $ident The identity string. * @param array $conf The configuration array. * @param int $level Log messages up to and including this level. * @access public */ function Log_win($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { $this->_id = md5(microtime()); $this->_name = $name; $this->_ident = $ident; $this->_mask = Log::UPTO($level); if (isset($conf['title'])) { $this->_title = $conf['title']; } if (isset($conf['colors']) && is_array($conf['colors'])) { $this->_colors = $conf['colors']; } register_shutdown_function(array(&$this, '_Log_win')); } /** * Destructor */ function _Log_win() { if ($this->_opened || (count($this->_buffer) > 0)) { $this->close(); } } /** * The first time open() is called, it will open a new browser window and * prepare it for output. * * This is implicitly called by log(), if necessary. * * @access public */ function open() { if (!$this->_opened) { $win = $this->_name; if (!empty($this->_ident)) { $identHeader = "$win.document.writeln('<th>Ident</th>')"; } else { $identHeader = ''; } echo <<< END_OF_SCRIPT <script language="JavaScript"> $win = window.open('', '{$this->_name}', 'toolbar=no,scrollbars,width=600,height=400'); $win.document.writeln('<html>'); $win.document.writeln('<head>'); $win.document.writeln('<title>{$this->_title}</title>'); $win.document.writeln('<style type="text/css">'); $win.document.writeln('body { font-family: monospace; font-size: 8pt; }'); $win.document.writeln('td,th { font-size: 8pt; }'); $win.document.writeln('td,th { border-bottom: #999999 solid 1px; }'); $win.document.writeln('td,th { border-right: #999999 solid 1px; }'); $win.document.writeln('</style>'); $win.document.writeln('</head>'); $win.document.writeln('<body>'); $win.document.writeln('<table border="0" cellpadding="2" cellspacing="0">'); $win.document.writeln('<tr><th>Time</th>'); $identHeader $win.document.writeln('<th>Priority</th><th width="100%">Message</th></tr>'); </script> END_OF_SCRIPT; $this->_opened = true; } return $this->_opened; } /** * Closes the output stream if it is open. If there are still pending * lines in the output buffer, the output window will be opened so that * the buffer can be drained. * * @access public */ function close() { /* * If there are still lines waiting to be written, open the output * window so that we can drain the buffer. */ if (!$this->_opened && (count($this->_buffer) > 0)) { $this->open(); } if ($this->_opened) { $this->_writeln('</table>'); $this->_writeln('</body></html>'); $this->_opened = false; } return ($this->_opened === false); } /** * Writes a single line of text to the output window. * * @param string $line The line of text to write. * * @access private */ function _writeln($line) { /* Add this line to our output buffer. */ $this->_buffer[] = $line; /* Buffer the output until this page's headers have been sent. */ if (!headers_sent()) { return; } /* If we haven't already opened the output window, do so now. */ if (!$this->_opened && !$this->open()) { return false; } /* Drain the buffer to the output window. */ $win = $this->_name; foreach ($this->_buffer as $line) { echo "<script language='JavaScript'>\n"; echo "$win.document.writeln('" . addslashes($line) . "');\n"; echo "self.focus();\n"; echo "</script>\n"; } /* Now that the buffer has been drained, clear it. */ $this->_buffer = array(); } /** * Logs $message to the output window. The message is also passed along * to any Log_observer instances that are observing this Log. * * @param mixed $message String or object containing the message to log. * @param string $priority The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } /* Extract the string representation of the message. */ $message = $this->_extractMessage($message); list($usec, $sec) = explode(' ', microtime()); /* Build the output line that contains the log entry row. */ $line = '<tr align="left" valign="top">'; $line .= sprintf('<td>%s.%s</td>', strftime('%T', $sec), substr($usec, 2, 2)); if (!empty($this->_ident)) { $line .= '<td>' . $this->_ident . '</td>'; } $line .= '<td>' . ucfirst($this->priorityToString($priority)) . '</td>'; $line .= sprintf('<td style="color: %s">%s</td>', $this->_colors[$priority], preg_replace('/\r\n|\n|\r/', '<br />', $message)); $line .= '</tr>'; $this->_writeln($line); $this->_announce(array('priority' => $priority, 'message' => $message)); return true; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/win.php
PHP
asf20
8,091
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/mail.php,v 1.1 2011/09/18 05:16:06 iling Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** * The Log_mail class is a concrete implementation of the Log:: abstract class * which sends log messages to a mailbox. * The mail is actually sent when you close() the logger, or when the destructor * is called (when the script is terminated). * * PLEASE NOTE that you must create a Log_mail object using =&, like this : * $logger =& Log::factory("mail", "recipient@example.com", ...) * * This is a PEAR requirement for destructors to work properly. * See http://pear.php.net/manual/en/class.pear.php * * @author Ronnie Garcia <ronnie@mk2.net> * @author Jon Parise <jon@php.net> * @since Log 1.3 * @package Log * * @example mail.php Using the mail handler. */ class Log_mail extends Log { /** * String holding the recipient's email address. * @var string * @access private */ var $_recipient = ''; /** * String holding the sender's email address. * @var string * @access private */ var $_from = ''; /** * String holding the email's subject. * @var string * @access private */ var $_subject = '[Log_mail] Log message'; /** * String holding an optional preamble for the log messages. * @var string * @access private */ var $_preamble = ''; /** * String holding the mail message body. * @var string * @access private */ var $_message = ''; /** * Constructs a new Log_mail object. * * Here is how you can customize the mail driver with the conf[] hash : * $conf['from'] : the mail's "From" header line, * $conf['subject'] : the mail's "Subject" line. * * @param string $name The filename of the logfile. * @param string $ident The identity string. * @param array $conf The configuration array. * @param int $level Log messages up to and including this level. * @access public */ function Log_mail($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { $this->_id = md5(microtime()); $this->_recipient = $name; $this->_ident = $ident; $this->_mask = Log::UPTO($level); if (!empty($conf['from'])) { $this->_from = $conf['from']; } else { $this->_from = ini_get('sendmail_from'); } if (!empty($conf['subject'])) { $this->_subject = $conf['subject']; } if (!empty($conf['preamble'])) { $this->_preamble = $conf['preamble']; } /* register the destructor */ register_shutdown_function(array(&$this, '_Log_mail')); } /** * Destructor. Calls close(). * * @access private */ function _Log_mail() { $this->close(); } /** * Starts a new mail message. * This is implicitly called by log(), if necessary. * * @access public */ function open() { if (!$this->_opened) { if (!empty($this->_preamble)) { $this->_message = $this->_preamble . "\r\n\r\n"; } $this->_opened = true; } return $this->_opened; } /** * Closes the message, if it is open, and sends the mail. * This is implicitly called by the destructor, if necessary. * * @access public */ function close() { if ($this->_opened) { if (!empty($this->_message)) { $headers = "From: $this->_from\r\n"; $headers .= "User-Agent: Log_mail"; if (mail($this->_recipient, $this->_subject, $this->_message, $headers) == false) { error_log("Log_mail: Failure executing mail()", 0); return false; } /* Clear the message string now that the email has been sent. */ $this->_message = ''; } $this->_opened = false; } return ($this->_opened === false); } /** * Flushes the log output by forcing the email message to be sent now. * Events that are logged after flush() is called will be appended to a * new email message. * * @access public * @since Log 1.8.2 */ function flush() { /* * It's sufficient to simply call close() to flush the output. * The next call to log() will cause the handler to be reopened. */ return $this->close(); } /** * Writes $message to the currently open mail message. * Calls open(), if necessary. * * @param mixed $message String or object containing the message to log. * @param string $priority The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } /* If the message isn't open and can't be opened, return failure. */ if (!$this->_opened && !$this->open()) { return false; } /* Extract the string representation of the message. */ $message = $this->_extractMessage($message); $entry = sprintf("%s %s [%s] %s\r\n", strftime('%b %d %H:%M:%S'), $this->_ident, Log::priorityToString($priority), $message); $this->_message .= $entry; $this->_announce(array('priority' => $priority, 'message' => $message)); return true; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/mail.php
PHP
asf20
6,489
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/display.php,v 1.1 2011/09/18 05:16:06 iling Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** * The Log_display class is a concrete implementation of the Log:: * abstract class which writes message into browser in usual PHP maner. * This may be useful because when you use PEAR::setErrorHandling in * PEAR_ERROR_CALLBACK mode error messages are not displayed by * PHP error handler. * * @author Paul Yanchenko <pusher@inaco.ru> * @since Log 1.8.0 * @package Log * * @example display.php Using the display handler. */ class Log_display extends Log { /** * String to output before an error message * @var string * @access private */ var $_error_prepend = ''; /** * String to output after an error message * @var string * @access private */ var $_error_append = ''; /** * String used to represent a line break. * @var string * @access private */ var $_linebreak = "<br />\n"; /** * Constructs a new Log_display object. * * @param string $name Ignored. * @param string $ident The identity string. * @param array $conf The configuration array. * @param int $level Log messages up to and including this level. * @access public */ function Log_display($name = '', $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { $this->_id = md5(microtime()); $this->_ident = $ident; $this->_mask = Log::UPTO($level); if (isset($conf['error_prepend'])) { $this->_error_prepend = $conf['error_prepend']; } else { $this->_error_prepend = ini_get('error_prepend_string'); } if (isset($conf['error_append'])) { $this->_error_append = $conf['error_append']; } else { $this->_error_append = ini_get('error_append_string'); } if (isset($conf['linebreak'])) { $this->_linebreak = $conf['linebreak']; } } /** * Writes $message to the text browser. Also, passes the message * along to any Log_observer instances that are observing this Log. * * @param mixed $message String or object containing the message to log. * @param string $priority The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } /* Extract the string representation of the message. */ $message = $this->_extractMessage($message); /* Build and output the complete log line. */ echo $this->_error_prepend . '<b>' . ucfirst($this->priorityToString($priority)) . '</b>: '. nl2br(htmlspecialchars($message)) . $this->_error_append . $this->_linebreak; /* Notify observers about this log message. */ $this->_announce(array('priority' => $priority, 'message' => $message)); return true; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/display.php
PHP
asf20
3,777
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/console.php,v 1.1 2011/09/18 05:16:06 iling Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** * The Log_console class is a concrete implementation of the Log:: * abstract class which writes message to the text console. * * @author Jon Parise <jon@php.net> * @since Log 1.1 * @package Log * * @example console.php Using the console handler. */ class Log_console extends Log { /** * Handle to the current output stream. * @var resource * @access private */ var $_stream = STDOUT; /** * Should the output be buffered or displayed immediately? * @var string * @access private */ var $_buffering = false; /** * String holding the buffered output. * @var string * @access private */ var $_buffer = ''; /** * String containing the format of a log line. * @var string * @access private */ var $_lineFormat = '%1$s %2$s [%3$s] %4$s'; /** * String containing the timestamp format. It will be passed directly to * strftime(). Note that the timestamp string will generated using the * current locale. * @var string * @access private */ var $_timeFormat = '%b %d %H:%M:%S'; /** * Hash that maps canonical format keys to position arguments for the * "line format" string. * @var array * @access private */ var $_formatMap = array('%{timestamp}' => '%1$s', '%{ident}' => '%2$s', '%{priority}' => '%3$s', '%{message}' => '%4$s', '%\{' => '%%{'); /** * Constructs a new Log_console object. * * @param string $name Ignored. * @param string $ident The identity string. * @param array $conf The configuration array. * @param int $level Log messages up to and including this level. * @access public */ function Log_console($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { $this->_id = md5(microtime()); $this->_ident = $ident; $this->_mask = Log::UPTO($level); if (!empty($conf['stream'])) { $this->_stream = $conf['stream']; } if (isset($conf['buffering'])) { $this->_buffering = $conf['buffering']; } if (!empty($conf['lineFormat'])) { $this->_lineFormat = str_replace(array_keys($this->_formatMap), array_values($this->_formatMap), $conf['lineFormat']); } if (!empty($conf['timeFormat'])) { $this->_timeFormat = $conf['timeFormat']; } /* * If output buffering has been requested, we need to register a * shutdown function that will dump the buffer upon termination. */ if ($this->_buffering) { register_shutdown_function(array(&$this, '_Log_console')); } } /** * Destructor */ function _Log_console() { $this->close(); } /** * Closes the output stream. * * This results in a call to flush(). * * @access public * @since Log 1.9.0 */ function close() { $this->flush(); } /** * Flushes all pending ("buffered") data to the output stream. * * @access public * @since Log 1.8.2 */ function flush() { /* * If output buffering is enabled, dump the contents of the buffer to * the output stream. */ if ($this->_buffering && (strlen($this->_buffer) > 0)) { fwrite($this->_stream, $this->_buffer); $this->_buffer = ''; } return fflush($this->_stream); } /** * Writes $message to the text console. Also, passes the message * along to any Log_observer instances that are observing this Log. * * @param mixed $message String or object containing the message to log. * @param string $priority The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } /* Extract the string representation of the message. */ $message = $this->_extractMessage($message); /* Build the string containing the complete log line. */ $line = sprintf($this->_lineFormat, strftime($this->_timeFormat), $this->_ident, $this->priorityToString($priority), $message) . "\n"; /* * If buffering is enabled, append this line to the output buffer. * Otherwise, print the line to the output stream immediately. */ if ($this->_buffering) { $this->_buffer .= $line; } else { fwrite($this->_stream, $line); } /* Notify observers about this log message. */ $this->_announce(array('priority' => $priority, 'message' => $message)); return true; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/console.php
PHP
asf20
6,003
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/mcal.php,v 1.1 2011/09/18 05:16:07 iling Exp $ * $Horde: horde/lib/Log/mcal.php,v 1.2 2000/06/28 21:36:13 jon Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** * The Log_mcal class is a concrete implementation of the Log:: * abstract class which sends messages to a local or remote calendar * store accessed through MCAL. * * @author Chuck Hagenbuch <chuck@horde.org> * @since Horde 1.3 * @since Log 1.0 * @package Log */ class Log_mcal extends Log { /** * holding the calendar specification to connect to. * @var string * @access private */ var $_calendar = '{localhost/mstore}'; /** * holding the username to use. * @var string * @access private */ var $_username = ''; /** * holding the password to use. * @var string * @access private */ var $_password = ''; /** * holding the options to pass to the calendar stream. * @var integer * @access private */ var $_options = 0; /** * ResourceID of the MCAL stream. * @var string * @access private */ var $_stream = ''; /** * Integer holding the log facility to use. * @var string * @access private */ var $_name = LOG_SYSLOG; /** * Constructs a new Log_mcal object. * * @param string $name The category to use for our events. * @param string $ident The identity string. * @param array $conf The configuration array. * @param int $level Log messages up to and including this level. * @access public */ function Log_mcal($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { $this->_id = md5(microtime()); $this->_name = $name; $this->_ident = $ident; $this->_mask = Log::UPTO($level); $this->_calendar = $conf['calendar']; $this->_username = $conf['username']; $this->_password = $conf['password']; $this->_options = $conf['options']; } /** * Opens a calendar stream, if it has not already been * opened. This is implicitly called by log(), if necessary. * @access public */ function open() { if (!$this->_opened) { $this->_stream = mcal_open($this->_calendar, $this->_username, $this->_password, $this->_options); $this->_opened = true; } return $this->_opened; } /** * Closes the calendar stream, if it is open. * @access public */ function close() { if ($this->_opened) { mcal_close($this->_stream); $this->_opened = false; } return ($this->_opened === false); } /** * Logs $message and associated information to the currently open * calendar stream. Calls open() if necessary. Also passes the * message along to any Log_observer instances that are observing * this Log. * * @param mixed $message String or object containing the message to log. * @param string $priority The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } /* If the connection isn't open and can't be opened, return failure. */ if (!$this->_opened && !$this->open()) { return false; } /* Extract the string representation of the message. */ $message = $this->_extractMessage($message); $date_str = date('Y:n:j:G:i:s'); $dates = explode(':', $date_str); mcal_event_init($this->_stream); mcal_event_set_title($this->_stream, $this->_ident); mcal_event_set_category($this->_stream, $this->_name); mcal_event_set_description($this->_stream, $message); mcal_event_add_attribute($this->_stream, 'priority', $priority); mcal_event_set_start($this->_stream, $dates[0], $dates[1], $dates[2], $dates[3], $dates[4], $dates[5]); mcal_event_set_end($this->_stream, $dates[0], $dates[1], $dates[2], $dates[3], $dates[4], $dates[5]); mcal_append_event($this->_stream); $this->_announce(array('priority' => $priority, 'message' => $message)); return true; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/mcal.php
PHP
asf20
5,137
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/sql.php,v 1.1 2011/09/18 05:16:06 iling Exp $ * $Horde: horde/lib/Log/sql.php,v 1.12 2000/08/16 20:27:34 chuck Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** PEAR's DB package */ require_once 'DB.php'; /** * The Log_sql class is a concrete implementation of the Log:: * abstract class which sends messages to an SQL server. Each entry * occupies a separate row in the database. * * This implementation uses PHP's PEAR database abstraction layer. * * CREATE TABLE log_table ( * id INT NOT NULL, * logtime TIMESTAMP NOT NULL, * ident CHAR(16) NOT NULL, * priority INT NOT NULL, * message VARCHAR(200), * PRIMARY KEY (id) * ); * * @author Jon Parise <jon@php.net> * @since Horde 1.3 * @since Log 1.0 * @package Log * * @example sql.php Using the SQL handler. */ class Log_sql extends Log { /** * Variable containing the DSN information. * @var mixed * @access private */ var $_dsn = ''; /** * String containing the SQL insertion statement. * * @var string * @access private */ var $_sql = ''; /** * Array containing our set of DB configuration options. * @var array * @access private */ var $_options = array('persistent' => true); /** * Object holding the database handle. * @var object * @access private */ var $_db = null; /** * Resource holding the prepared statement handle. * @var resource * @access private */ var $_statement = null; /** * Flag indicating that we're using an existing database connection. * @var boolean * @access private */ var $_existingConnection = false; /** * String holding the database table to use. * @var string * @access private */ var $_table = 'log_table'; /** * String holding the name of the ID sequence. * @var string * @access private */ var $_sequence = 'log_id'; /** * Maximum length of the $ident string. This corresponds to the size of * the 'ident' column in the SQL table. * @var integer * @access private */ var $_identLimit = 16; /** * Constructs a new sql logging object. * * @param string $name The target SQL table. * @param string $ident The identification field. * @param array $conf The connection configuration array. * @param int $level Log messages up to and including this level. * @access public */ function Log_sql($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { $this->_id = md5(microtime()); $this->_table = $name; $this->_mask = Log::UPTO($level); /* Now that we have a table name, assign our SQL statement. */ if (!empty($this->_sql)) { $this->_sql = $conf['sql']; } else { $this->_sql = 'INSERT INTO ' . $this->_table . ' (id, logtime, ident, priority, message)' . ' VALUES(?, CURRENT_TIMESTAMP, ?, ?, ?)'; } /* If an options array was provided, use it. */ if (isset($conf['options']) && is_array($conf['options'])) { $this->_options = $conf['options']; } /* If a specific sequence name was provided, use it. */ if (!empty($conf['sequence'])) { $this->_sequence = $conf['sequence']; } /* If a specific sequence name was provided, use it. */ if (isset($conf['identLimit'])) { $this->_identLimit = $conf['identLimit']; } /* Now that the ident limit is confirmed, set the ident string. */ $this->setIdent($ident); /* If an existing database connection was provided, use it. */ if (isset($conf['db'])) { $this->_db = &$conf['db']; $this->_existingConnection = true; $this->_opened = true; } else { $this->_dsn = $conf['dsn']; } } /** * Opens a connection to the database, if it has not already * been opened. This is implicitly called by log(), if necessary. * * @return boolean True on success, false on failure. * @access public */ function open() { if (!$this->_opened) { /* Use the DSN and options to create a database connection. */ $this->_db = &DB::connect($this->_dsn, $this->_options); if (DB::isError($this->_db)) { return false; } /* Create a prepared statement for repeated use in log(). */ if (!$this->_prepareStatement()) { return false; } /* We now consider out connection open. */ $this->_opened = true; } return $this->_opened; } /** * Closes the connection to the database if it is still open and we were * the ones that opened it. It is the caller's responsible to close an * existing connection that was passed to us via $conf['db']. * * @return boolean True on success, false on failure. * @access public */ function close() { if ($this->_opened && !$this->_existingConnection) { $this->_opened = false; $this->_db->freePrepared($this->_statement); return $this->_db->disconnect(); } return ($this->_opened === false); } /** * Sets this Log instance's identification string. Note that this * SQL-specific implementation will limit the length of the $ident string * to sixteen (16) characters. * * @param string $ident The new identification string. * * @access public * @since Log 1.8.5 */ function setIdent($ident) { $this->_ident = substr($ident, 0, $this->_identLimit); } /** * Inserts $message to the currently open database. Calls open(), * if necessary. Also passes the message along to any Log_observer * instances that are observing this Log. * * @param mixed $message String or object containing the message to log. * @param string $priority The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } /* If the connection isn't open and can't be opened, return failure. */ if (!$this->_opened && !$this->open()) { return false; } /* If we don't already have our statement object yet, create it. */ if (!is_object($this->_statement) && !$this->_prepareStatement()) { return false; } /* Extract the string representation of the message. */ $message = $this->_extractMessage($message); /* Build our set of values for this log entry. */ $id = $this->_db->nextId($this->_sequence); $values = array($id, $this->_ident, $priority, $message); /* Execute the SQL query for this log entry insertion. */ $result =& $this->_db->execute($this->_statement, $values); if (DB::isError($result)) { return false; } $this->_announce(array('priority' => $priority, 'message' => $message)); return true; } /** * Prepare the SQL insertion statement. * * @return boolean True if the statement was successfully created. * * @access private * @since Log 1.9.1 */ function _prepareStatement() { $this->_statement = $this->_db->prepare($this->_sql); /* Return success if we didn't generate an error. */ return (DB::isError($this->_statement) === false); } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/sql.php
PHP
asf20
8,770
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log/null.php,v 1.1 2011/09/18 05:16:06 iling Exp $ * * @version $Revision: 1.1 $ * @package Log */ /** * The Log_null class is a concrete implementation of the Log:: abstract * class. It simply consumes log events. * * @author Jon Parise <jon@php.net> * @since Log 1.8.2 * @package Log * * @example null.php Using the null handler. */ class Log_null extends Log { /** * Constructs a new Log_null object. * * @param string $name Ignored. * @param string $ident The identity string. * @param array $conf The configuration array. * @param int $level Log messages up to and including this level. * @access public */ function Log_null($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { $this->_id = md5(microtime()); $this->_ident = $ident; $this->_mask = Log::UPTO($level); } /** * Simply consumes the log event. The message will still be passed * along to any Log_observer instances that are observing this Log. * * @param mixed $message String or object containing the message to log. * @param string $priority The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. * @access public */ function log($message, $priority = null) { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->_priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->_isMasked($priority)) { return false; } $this->_announce(array('priority' => $priority, 'message' => $message)); return true; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log/null.php
PHP
asf20
2,141
<?php /** * Base PayPal SDK file. * * @package PayPal */ /** * Include our error class and the PEAR base class. */ require_once 'PEAR.php'; require_once 'PayPal/Error.php'; /** * End point for users to access the PayPal API, provides utility * methods used internally as well as factory methods. * * $Id: PayPal.php,v 1.1 2011/09/18 05:15:14 iling Exp $ * * @static * @package PayPal */ class PayPal extends PEAR { /** * Raise an error when one occurs * * @static */ function raiseError($message, $code = null) { return parent::raiseError($message, $code, null, null, null, 'PayPal_Error'); } /** * Try to instantiate the class for $type. Looks inside the Type/ * directory containing all generated types. Allows for run-time * loading of needed types. * * @param string $type The name of the type (eg. AbstractRequestType). * * @return mixed XSDType | PayPal_Error Either an instance of $type or an error. * * @static */ function &getType($type) { $type = basename($type); @include_once 'PayPal/Type/' . $type . '.php'; if (!class_exists($type)) { $t = PayPal::raiseError("Type $type is not defined"); } else { $t = new $type(); } return $t; } /** * Load a CallerServices object for making API calls. * * @param APIProfile $profile The profile with the username, password, * and any other information necessary to use * CallerServices. * * @return CallerServices A PayPal API caller object. * * @static */ function &getCallerServices($profile) { if (!defined('CURLOPT_SSLCERT')) { $e = PayPal::raiseError("The PayPal SDK requires curl with SSL support"); return $e; } if (!is_a($profile, 'APIProfile')) { $e = PayPal::raiseError("You must provide a valid APIProfile"); return $e; } $result = $profile->validate(); if (PayPal::isError($result)) { return $result; } include_once 'PayPal/CallerServices.php'; $c =& new CallerServices($profile); return $c; } /** * Load an EWPServices object for performing encryption * operations. * * @param EWPProfile $profile The profile with the username, password, * and any other information necessary to use * EWPServices. * * @return EWPServices A PayPal EWP services object. * * @static */ function &getEWPServices($profile) { if (!is_a($profile, 'EWPProfile')) { return parent::raiseError("You must provide a valid EWPProfile"); } $result = $profile->validate(); if (PayPal::isError($result)) { return $result; } include_once 'PayPal/EWPServices.php'; return $c =& new EWPServices($profile); } /** * Returns the package root directory. * * @return string The path where the package is installed. * * @static */ function getPackageRoot() { return dirname(__FILE__) . '/PayPal'; } /** * Returns the version of the WSDL that this SDK is built against. * * @return float The WSDL version. * * @static */ function getWSDLVersion() { include_once 'PayPal/CallerServices.php'; return PAYPAL_WSDL_VERSION; } /** * Returns the endpoint map. * * @return mixed The Paypal endpoint map or a Paypal error object on failure * @static */ function getEndpoints() { $package_root = PayPal::getPackageRoot(); $file = "$package_root/wsdl/paypal-endpoints.php"; if (@include $file) { if (!isset($PayPalEndpoints)) { return PayPal::raiseError("Endpoint map file found, but no data was found."); } return $PayPalEndpoints; } return PayPal::raiseError("Could not load endpoint mapping from '$file', please rebuild SDK."); } /** * Get information describing all types provided by the SDK. * @static */ function getTypeList() { $root_dir = PayPal::getPackageRoot(); $types = "$root_dir/Type/*.php"; $files = glob($types); if (count($files) < 2) { return PayPal::raiseError("Types not found in package! (Looked for '$types')"); } $retval = array(); foreach ($files as $type_files) { $retval[] = basename(substr($type_files, 0, strpos($type_files, '.'))); } return $retval; } /** * Get information describing which methods are available. * @static */ function getCallerServicesIntrospection() { include_once 'PayPal/CallerServices.php'; return unserialize(PAYPAL_WSDL_METHODS); } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal.php
PHP
asf20
5,313
<? require_once "PayPal/SOAP/Value.php"; require_once "PayPal/Type/XSDType.php"; /** * PayPal SDK class for handling items that can occur multiple times, e.g. * PaymentDetailsItem in the DoExpressCheckout call. */ class MultiOccurs extends XSDType { /** * Constructor. Pass the node and element name you will be using this in. * For example: * * $PaymentDetailsItem=&new MultiOccurs($PaymentDetails, * 'PaymentDetailsItem'); * $PaymentDetailsItem->setKids($items); * $PaymentDetails->setPaymentDetailsItem($PaymentDetailsItem); * * @param XSDType $xsd The XSDType object this will be used in. * @param string $element The element in $xsd this will be used for. */ function MultiOccurs($xsd, $item) { if (!isset($xsd->_elements[$item])) return null; $this->_type = $xsd->_elements[$item]['type']; $this->_namespace = $xsd->_elements[$item]['namespace']; $this->kids = array(); } /** * Add an instance of the multiply-occuring item. * * @param XSDType $child Instance of the multiply-occurring XSDType * object. */ function addChild($child) { $this->kids[] = $child; } /** * Set the multiply-occurring XSD nodes as an array. * * @param array $children Array of XSDType objects. */ function setChildren($children) { $this->kids = $children; } /** * Get the multiply-occurring XSD nodes as an array. * * @return array Array of XSDType objects. */ function getChildren() { return $this->kids; } function &getSoapValue($name, $ns=null) { $elements = array(); foreach ($this->kids as $value) { if (is_a($value, 'XSDType')) { $elements[] =& $value->getSoapValue($name, $ns); } else { if (is_string($value) && $element['charset'] == 'iso-8859-1' && (utf8_encode(utf8_decode($value)) != $value)) { $value = utf8_encode($value); } $elements[] =& new SOAP_Value($name, $this->_type, $value); } } if(count($elements) == 1) { return array_shift($elements); } return new SOAP_Multi($elements); } } /** * SOAP_Value that will output as a list of multiply-occurring items as * siblings. */ class SOAP_Multi extends SOAP_Value { /** * Constructor. Pass an array of SOAP_Values which will be output as * siblings. * * @param array $kids SOAP_Values. */ function SOAP_Multi($kids=array()) { $this->kids = $kids; } function serialize(&$serializer) { $value = ''; foreach ($this->kids as $k) { $value .= $k->serialize($serializer); } return $value; } } ?>
123gohelmetsv2
trunk/lib/paypal-sdk/Multi.php
PHP
asf20
3,188
<?php /** * $Header: /cvs_storage/123gohelmets_v2/lib/paypal-sdk/Log.php,v 1.1 2011/09/18 05:15:14 iling Exp $ * $Horde: horde/lib/Log.php,v 1.15 2000/06/29 23:39:45 jon Exp $ * * @version $Revision: 1.1 $ * @package Log */ define('PEAR_LOG_EMERG', 0); /** System is unusable */ define('PEAR_LOG_ALERT', 1); /** Immediate action required */ define('PEAR_LOG_CRIT', 2); /** Critical conditions */ define('PEAR_LOG_ERR', 3); /** Error conditions */ define('PEAR_LOG_WARNING', 4); /** Warning conditions */ define('PEAR_LOG_NOTICE', 5); /** Normal but significant */ define('PEAR_LOG_INFO', 6); /** Informational */ define('PEAR_LOG_DEBUG', 7); /** Debug-level messages */ define('PEAR_LOG_ALL', bindec('11111111')); /** All messages */ define('PEAR_LOG_NONE', bindec('00000000')); /** No message */ /* Log types for PHP's native error_log() function. */ define('PEAR_LOG_TYPE_SYSTEM', 0); /** Use PHP's system logger */ define('PEAR_LOG_TYPE_MAIL', 1); /** Use PHP's mail() function */ define('PEAR_LOG_TYPE_DEBUG', 2); /** Use PHP's debugging connection */ define('PEAR_LOG_TYPE_FILE', 3); /** Append to a file */ /** * The Log:: class implements both an abstraction for various logging * mechanisms and the Subject end of a Subject-Observer pattern. * * @author Chuck Hagenbuch <chuck@horde.org> * @author Jon Parise <jon@php.net> * @since Horde 1.3 * @package Log */ class Log { /** * Indicates whether or not the log can been opened / connected. * * @var boolean * @access private */ var $_opened = false; /** * Instance-specific unique identification number. * * @var integer * @access private */ var $_id = 0; /** * The label that uniquely identifies this set of log messages. * * @var string * @access private */ var $_ident = ''; /** * The default priority to use when logging an event. * * @var integer * @access private */ var $_priority = PEAR_LOG_INFO; /** * The bitmask of allowed log levels. * @var integer * @access private */ var $_mask = PEAR_LOG_ALL; /** * Holds all Log_observer objects that wish to be notified of new messages. * * @var array * @access private */ var $_listeners = array(); /** * Attempts to return a concrete Log instance of type $handler. * * @param string $handler The type of concrete Log subclass to return. * Attempt to dynamically include the code for * this subclass. Currently, valid values are * 'console', 'syslog', 'sql', 'file', and 'mcal'. * * @param string $name The name of the actually log file, table, or * other specific store to use. Defaults to an * empty string, with which the subclass will * attempt to do something intelligent. * * @param string $ident The identity reported to the log system. * * @param array $conf A hash containing any additional configuration * information that a subclass might need. * * @param int $level Log messages up to and including this level. * * @return object Log The newly created concrete Log instance, or * null on an error. * @access public * @since Log 1.0 */ function &factory($handler, $name = '', $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { $handler = strtolower($handler); $class = 'Log_' . $handler; $classfile = 'Log/' . $handler . '.php'; /* * Attempt to include our version of the named class, but don't treat * a failure as fatal. The caller may have already included their own * version of the named class. */ if (!class_exists($class)) { @include_once $classfile; } /* If the class exists, return a new instance of it. */ if (class_exists($class)) { $obj = new $class($name, $ident, $conf, $level); return $obj; } return null; } /** * Attempts to return a reference to a concrete Log instance of type * $handler, only creating a new instance if no log instance with the same * parameters currently exists. * * You should use this if there are multiple places you might create a * logger, you don't want to create multiple loggers, and you don't want to * check for the existance of one each time. The singleton pattern does all * the checking work for you. * * <b>You MUST call this method with the $var = &Log::singleton() syntax. * Without the ampersand (&) in front of the method name, you will not get * a reference, you will get a copy.</b> * * @param string $handler The type of concrete Log subclass to return. * Attempt to dynamically include the code for * this subclass. Currently, valid values are * 'console', 'syslog', 'sql', 'file', and 'mcal'. * * @param string $name The name of the actually log file, table, or * other specific store to use. Defaults to an * empty string, with which the subclass will * attempt to do something intelligent. * * @param string $ident The identity reported to the log system. * * @param array $conf A hash containing any additional configuration * information that a subclass might need. * * @param int $level Log messages up to and including this level. * * @return object Log The newly created concrete Log instance, or * null on an error. * @access public * @since Log 1.0 */ function &singleton($handler, $name = '', $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG) { static $instances; if (!isset($instances)) $instances = array(); $signature = serialize(array($handler, $name, $ident, $conf, $level)); if (!isset($instances[$signature])) { $instances[$signature] = &Log::factory($handler, $name, $ident, $conf, $level); } return $instances[$signature]; } /** * Abstract implementation of the open() method. * @since Log 1.0 */ function open() { return false; } /** * Abstract implementation of the close() method. * @since Log 1.0 */ function close() { return false; } /** * Abstract implementation of the flush() method. * @since Log 1.8.2 */ function flush() { return false; } /** * Abstract implementation of the log() method. * @since Log 1.0 */ function log($message, $priority = null) { return false; } /** * A convenience function for logging a emergency event. It will log a * message at the PEAR_LOG_EMERG log level. * * @param mixed $message String or object containing the message * to log. * * @return boolean True if the message was successfully logged. * * @access public * @since Log 1.7.0 */ function emerg($message) { return $this->log($message, PEAR_LOG_EMERG); } /** * A convenience function for logging an alert event. It will log a * message at the PEAR_LOG_ALERT log level. * * @param mixed $message String or object containing the message * to log. * * @return boolean True if the message was successfully logged. * * @access public * @since Log 1.7.0 */ function alert($message) { return $this->log($message, PEAR_LOG_ALERT); } /** * A convenience function for logging a critical event. It will log a * message at the PEAR_LOG_CRIT log level. * * @param mixed $message String or object containing the message * to log. * * @return boolean True if the message was successfully logged. * * @access public * @since Log 1.7.0 */ function crit($message) { return $this->log($message, PEAR_LOG_CRIT); } /** * A convenience function for logging a error event. It will log a * message at the PEAR_LOG_ERR log level. * * @param mixed $message String or object containing the message * to log. * * @return boolean True if the message was successfully logged. * * @access public * @since Log 1.7.0 */ function err($message) { return $this->log($message, PEAR_LOG_ERR); } /** * A convenience function for logging a warning event. It will log a * message at the PEAR_LOG_WARNING log level. * * @param mixed $message String or object containing the message * to log. * * @return boolean True if the message was successfully logged. * * @access public * @since Log 1.7.0 */ function warning($message) { return $this->log($message, PEAR_LOG_WARNING); } /** * A convenience function for logging a notice event. It will log a * message at the PEAR_LOG_NOTICE log level. * * @param mixed $message String or object containing the message * to log. * * @return boolean True if the message was successfully logged. * * @access public * @since Log 1.7.0 */ function notice($message) { return $this->log($message, PEAR_LOG_NOTICE); } /** * A convenience function for logging a information event. It will log a * message at the PEAR_LOG_INFO log level. * * @param mixed $message String or object containing the message * to log. * * @return boolean True if the message was successfully logged. * * @access public * @since Log 1.7.0 */ function info($message) { return $this->log($message, PEAR_LOG_INFO); } /** * A convenience function for logging a debug event. It will log a * message at the PEAR_LOG_DEBUG log level. * * @param mixed $message String or object containing the message * to log. * * @return boolean True if the message was successfully logged. * * @access public * @since Log 1.7.0 */ function debug($message) { return $this->log($message, PEAR_LOG_DEBUG); } /** * Returns the string representation of the message data. * * If $message is an object, _extractMessage() will attempt to extract * the message text using a known method (such as a PEAR_Error object's * getMessage() method). If a known method, cannot be found, the * serialized representation of the object will be returned. * * If the message data is already a string, it will be returned unchanged. * * @param mixed $message The original message data. This may be a * string or any object. * * @return string The string representation of the message. * * @access private */ function _extractMessage($message) { /* * If we've been given an object, attempt to extract the message using * a known method. If we can't find such a method, default to the * "human-readable" version of the object. * * We also use the human-readable format for arrays. */ if (is_object($message)) { if (method_exists($message, 'getmessage')) { $message = $message->getMessage(); } else if (method_exists($message, 'tostring')) { $message = $message->toString(); } else if (method_exists($message, '__tostring')) { if (version_compare(PHP_VERSION, '5.0.0', 'ge')) { $message = (string)$message; } else { $message = $message->__toString(); } } else { $message = print_r($message, true); } } else if (is_array($message)) { if (isset($message['message'])) { $message = $message['message']; } else { $message = print_r($message, true); } } /* Otherwise, we assume the message is a string. */ return $message; } /** * Returns the string representation of a PEAR_LOG_* integer constant. * * @param int $priority A PEAR_LOG_* integer constant. * * @return string The string representation of $level. * * @since Log 1.0 */ function priorityToString($priority) { $levels = array( PEAR_LOG_EMERG => 'emergency', PEAR_LOG_ALERT => 'alert', PEAR_LOG_CRIT => 'critical', PEAR_LOG_ERR => 'error', PEAR_LOG_WARNING => 'warning', PEAR_LOG_NOTICE => 'notice', PEAR_LOG_INFO => 'info', PEAR_LOG_DEBUG => 'debug' ); return $levels[$priority]; } /** * Returns the the PEAR_LOG_* integer constant for the given string * representation of a priority name. This function performs a * case-insensitive search. * * @param string $name String containing a priority name. * * @return string The PEAR_LOG_* integer contstant corresponding * the the specified priority name. * * @since Log 1.9.0 */ function stringToPriority($name) { $levels = array( 'emergency' => PEAR_LOG_EMERG, 'alert' => PEAR_LOG_ALERT, 'critical' => PEAR_LOG_CRIT, 'error' => PEAR_LOG_ERR, 'warning' => PEAR_LOG_WARNING, 'notice' => PEAR_LOG_NOTICE, 'info' => PEAR_LOG_INFO, 'debug' => PEAR_LOG_DEBUG ); return $levels[strtolower($name)]; } /** * Calculate the log mask for the given priority. * * @param integer $priority The priority whose mask will be calculated. * * @return integer The calculated log mask. * * @access public * @since Log 1.7.0 */ function MASK($priority) { return (1 << $priority); } /** * Calculate the log mask for all priorities up to the given priority. * * @param integer $priority The maximum priority covered by this mask. * * @return integer The calculated log mask. * * @access public * @since Log 1.7.0 */ function UPTO($priority) { return ((1 << ($priority + 1)) - 1); } /** * Set and return the level mask for the current Log instance. * * @param integer $mask A bitwise mask of log levels. * * @return integer The current level mask. * * @access public * @since Log 1.7.0 */ function setMask($mask) { $this->_mask = $mask; return $this->_mask; } /** * Returns the current level mask. * * @return interger The current level mask. * * @access public * @since Log 1.7.0 */ function getMask() { return $this->_mask; } /** * Check if the given priority is included in the current level mask. * * @param integer $priority The priority to check. * * @return boolean True if the given priority is included in the current * log mask. * * @access private * @since Log 1.7.0 */ function _isMasked($priority) { return (Log::MASK($priority) & $this->_mask); } /** * Returns the current default priority. * * @return integer The current default priority. * * @access public * @since Log 1.8.4 */ function getPriority() { return $this->_priority; } /** * Sets the default priority to the specified value. * * @param integer $priority The new default priority. * * @access public * @since Log 1.8.4 */ function setPriority($priority) { $this->_priority = $priority; } /** * Adds a Log_observer instance to the list of observers that are listening * for messages emitted by this Log instance. * * @param object $observer The Log_observer instance to attach as a * listener. * * @param boolean True if the observer is successfully attached. * * @access public * @since Log 1.0 */ function attach(&$observer) { if (!is_a($observer, 'Log_observer')) { return false; } $this->_listeners[$observer->_id] = &$observer; return true; } /** * Removes a Log_observer instance from the list of observers. * * @param object $observer The Log_observer instance to detach from * the list of listeners. * * @param boolean True if the observer is successfully detached. * * @access public * @since Log 1.0 */ function detach($observer) { if (!is_a($observer, 'Log_observer') || !isset($this->_listeners[$observer->_id])) { return false; } unset($this->_listeners[$observer->_id]); return true; } /** * Informs each registered observer instance that a new message has been * logged. * * @param array $event A hash describing the log event. * * @access private */ function _announce($event) { foreach ($this->_listeners as $id => $listener) { if ($event['priority'] <= $this->_listeners[$id]->_priority) { $this->_listeners[$id]->notify($event); } } } /** * Indicates whether this is a composite class. * * @return boolean True if this is a composite class. * * @access public * @since Log 1.0 */ function isComposite() { return false; } /** * Sets this Log instance's identification string. * * @param string $ident The new identification string. * * @access public * @since Log 1.6.3 */ function setIdent($ident) { $this->_ident = $ident; } /** * Returns the current identification string. * * @return string The current Log instance's identification string. * * @access public * @since Log 1.6.3 */ function getIdent() { return $this->_ident; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Log.php
PHP
asf20
20,404
<?php // +-----------------------------------------------------------------------+ // | Copyright (c) 2002-2003, Richard Heyes | // | All rights reserved. | // | | // | Redistribution and use in source and binary forms, with or without | // | modification, are permitted provided that the following conditions | // | are met: | // | | // | o Redistributions of source code must retain the above copyright | // | notice, this list of conditions and the following disclaimer. | // | o Redistributions in binary form must reproduce the above copyright | // | notice, this list of conditions and the following disclaimer in the | // | documentation and/or other materials provided with the distribution.| // | o The names of the authors may not be used to endorse or promote | // | products derived from this software without specific prior written | // | permission. | // | | // | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | // | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | // | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | // | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | // | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | // | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | // | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | // | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | // | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | // | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | // | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | // | | // +-----------------------------------------------------------------------+ // | Author: Alexey Borzov <avb@php.net> | // +-----------------------------------------------------------------------+ // // $Id: Listener.php,v 1.1 2011/09/18 05:16:04 iling Exp $ // /** * This class implements the Observer part of a Subject-Observer * design pattern. It listens to the events sent by a * HTTP_Request or HTTP_Response instance. * * @package HTTP_Request * @author Alexey Borzov <avb@php.net> * @version $Revision: 1.1 $ */ class HTTP_Request_Listener { /** * A listener's identifier * @var string */ var $_id; /** * Constructor, sets the object's identifier * * @access public */ function HTTP_Request_Listener() { $this->_id = md5(uniqid('http_request_', 1)); } /** * Returns the listener's identifier * * @access public * @return string */ function getId() { return $this->_id; } /** * This method is called when Listener is notified of an event * * @access public * @param object an object the listener is attached to * @param string Event name * @param mixed Additional data * @abstract */ function update(&$subject, $event, $data = null) { echo "Notified of event: '$event'\n"; if (null !== $data) { echo "Additional data: "; var_dump($data); } } } ?>
123gohelmetsv2
trunk/lib/paypal-sdk/HTTP/Request/Listener.php
PHP
asf20
3,850
<?php // +-----------------------------------------------------------------------+ // | Copyright (c) 2002-2003, Richard Heyes | // | All rights reserved. | // | | // | Redistribution and use in source and binary forms, with or without | // | modification, are permitted provided that the following conditions | // | are met: | // | | // | o Redistributions of source code must retain the above copyright | // | notice, this list of conditions and the following disclaimer. | // | o Redistributions in binary form must reproduce the above copyright | // | notice, this list of conditions and the following disclaimer in the | // | documentation and/or other materials provided with the distribution.| // | o The names of the authors may not be used to endorse or promote | // | products derived from this software without specific prior written | // | permission. | // | | // | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | // | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | // | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | // | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | // | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | // | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | // | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | // | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | // | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | // | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | // | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | // | | // +-----------------------------------------------------------------------+ // | Author: Richard Heyes <richard@phpguru.org> | // +-----------------------------------------------------------------------+ // // $Id: Request.php,v 1.1 2011/09/18 05:16:00 iling Exp $ // // HTTP_Request Class // // Simple example, (Fetches yahoo.com and displays it): // // $a = &new HTTP_Request('http://www.yahoo.com/'); // $a->sendRequest(); // echo $a->getResponseBody(); // require_once 'PEAR.php'; require_once 'Net/Socket.php'; require_once 'Net/URL.php'; define('HTTP_REQUEST_METHOD_GET', 'GET', true); define('HTTP_REQUEST_METHOD_HEAD', 'HEAD', true); define('HTTP_REQUEST_METHOD_POST', 'POST', true); define('HTTP_REQUEST_METHOD_PUT', 'PUT', true); define('HTTP_REQUEST_METHOD_DELETE', 'DELETE', true); define('HTTP_REQUEST_METHOD_OPTIONS', 'OPTIONS', true); define('HTTP_REQUEST_METHOD_TRACE', 'TRACE', true); define('HTTP_REQUEST_HTTP_VER_1_0', '1.0', true); define('HTTP_REQUEST_HTTP_VER_1_1', '1.1', true); class HTTP_Request { /** * Instance of Net_URL * @var object Net_URL */ var $_url; /** * Type of request * @var string */ var $_method; /** * HTTP Version * @var string */ var $_http; /** * Request headers * @var array */ var $_requestHeaders; /** * Basic Auth Username * @var string */ var $_user; /** * Basic Auth Password * @var string */ var $_pass; /** * Socket object * @var object Net_Socket */ var $_sock; /** * Proxy server * @var string */ var $_proxy_host; /** * Proxy port * @var integer */ var $_proxy_port; /** * Proxy username * @var string */ var $_proxy_user; /** * Proxy password * @var string */ var $_proxy_pass; /** * Post data * @var array */ var $_postData; /** * Request body * @var string */ var $_body; /** * A list of methods that MUST NOT have a request body, per RFC 2616 * @var array */ var $_bodyDisallowed = array('TRACE'); /** * Files to post * @var array */ var $_postFiles = array(); /** * Connection timeout. * @var float */ var $_timeout; /** * HTTP_Response object * @var object HTTP_Response */ var $_response; /** * Whether to allow redirects * @var boolean */ var $_allowRedirects; /** * Maximum redirects allowed * @var integer */ var $_maxRedirects; /** * Current number of redirects * @var integer */ var $_redirects; /** * Whether to append brackets [] to array variables * @var bool */ var $_useBrackets = true; /** * Attached listeners * @var array */ var $_listeners = array(); /** * Whether to save response body in response object property * @var bool */ var $_saveBody = true; /** * Timeout for reading from socket (array(seconds, microseconds)) * @var array */ var $_readTimeout = null; /** * Options to pass to Net_Socket::connect. See stream_context_create * @var array */ var $_socketOptions = null; /** * Constructor * * Sets up the object * @param string The url to fetch/access * @param array Associative array of parameters which can have the following keys: * <ul> * <li>method - Method to use, GET, POST etc (string)</li> * <li>http - HTTP Version to use, 1.0 or 1.1 (string)</li> * <li>user - Basic Auth username (string)</li> * <li>pass - Basic Auth password (string)</li> * <li>proxy_host - Proxy server host (string)</li> * <li>proxy_port - Proxy server port (integer)</li> * <li>proxy_user - Proxy auth username (string)</li> * <li>proxy_pass - Proxy auth password (string)</li> * <li>timeout - Connection timeout in seconds (float)</li> * <li>allowRedirects - Whether to follow redirects or not (bool)</li> * <li>maxRedirects - Max number of redirects to follow (integer)</li> * <li>useBrackets - Whether to append [] to array variable names (bool)</li> * <li>saveBody - Whether to save response body in response object property (bool)</li> * <li>readTimeout - Timeout for reading / writing data over the socket (array (seconds, microseconds))</li> * <li>socketOptions - Options to pass to Net_Socket object (array)</li> * </ul> * @access public */ function HTTP_Request($url = '', $params = array()) { $this->_sock = &new Net_Socket(); $this->_method = HTTP_REQUEST_METHOD_GET; $this->_http = HTTP_REQUEST_HTTP_VER_1_1; $this->_requestHeaders = array(); $this->_postData = array(); $this->_body = null; $this->_user = null; $this->_pass = null; $this->_proxy_host = null; $this->_proxy_port = null; $this->_proxy_user = null; $this->_proxy_pass = null; $this->_allowRedirects = false; $this->_maxRedirects = 3; $this->_redirects = 0; $this->_timeout = null; $this->_response = null; foreach ($params as $key => $value) { $this->{'_' . $key} = $value; } if (!empty($url)) { $this->setURL($url); } // Default useragent $this->addHeader('User-Agent', 'PEAR HTTP_Request class ( http://pear.php.net/ )'); // Make sure keepalives dont knobble us $this->addHeader('Connection', 'close'); // Basic authentication if (!empty($this->_user)) { $this->addHeader('Authorization', 'Basic ' . base64_encode($this->_user . ':' . $this->_pass)); } // Use gzip encoding if possible // Avoid gzip encoding if using multibyte functions (see #1781) if (HTTP_REQUEST_HTTP_VER_1_1 == $this->_http && extension_loaded('zlib') && 0 == (2 & ini_get('mbstring.func_overload'))) { $this->addHeader('Accept-Encoding', 'gzip'); } } /** * Generates a Host header for HTTP/1.1 requests * * @access private * @return string */ function _generateHostHeader() { if ($this->_url->port != 80 AND strcasecmp($this->_url->protocol, 'http') == 0) { $host = $this->_url->host . ':' . $this->_url->port; } elseif ($this->_url->port != 443 AND strcasecmp($this->_url->protocol, 'https') == 0) { $host = $this->_url->host . ':' . $this->_url->port; } elseif ($this->_url->port == 443 AND strcasecmp($this->_url->protocol, 'https') == 0 AND strpos($this->_url->url, ':443') !== false) { $host = $this->_url->host . ':' . $this->_url->port; } else { $host = $this->_url->host; } return $host; } /** * Resets the object to its initial state (DEPRECATED). * Takes the same parameters as the constructor. * * @param string $url The url to be requested * @param array $params Associative array of parameters * (see constructor for details) * @access public * @deprecated deprecated since 1.2, call the constructor if this is necessary */ function reset($url, $params = array()) { $this->HTTP_Request($url, $params); } /** * Sets the URL to be requested * * @param string The url to be requested * @access public */ function setURL($url) { $this->_url = &new Net_URL($url, $this->_useBrackets); if (!empty($this->_url->user) || !empty($this->_url->pass)) { $this->setBasicAuth($this->_url->user, $this->_url->pass); } if (HTTP_REQUEST_HTTP_VER_1_1 == $this->_http) { $this->addHeader('Host', $this->_generateHostHeader()); } } /** * Sets a proxy to be used * * @param string Proxy host * @param int Proxy port * @param string Proxy username * @param string Proxy password * @access public */ function setProxy($host, $port = 8080, $user = null, $pass = null) { $this->_proxy_host = $host; $this->_proxy_port = $port; $this->_proxy_user = $user; $this->_proxy_pass = $pass; if (!empty($user)) { $this->addHeader('Proxy-Authorization', 'Basic ' . base64_encode($user . ':' . $pass)); } } /** * Sets basic authentication parameters * * @param string Username * @param string Password */ function setBasicAuth($user, $pass) { $this->_user = $user; $this->_pass = $pass; $this->addHeader('Authorization', 'Basic ' . base64_encode($user . ':' . $pass)); } /** * Sets the method to be used, GET, POST etc. * * @param string Method to use. Use the defined constants for this * @access public */ function setMethod($method) { $this->_method = $method; } /** * Sets the HTTP version to use, 1.0 or 1.1 * * @param string Version to use. Use the defined constants for this * @access public */ function setHttpVer($http) { $this->_http = $http; } /** * Adds a request header * * @param string Header name * @param string Header value * @access public */ function addHeader($name, $value) { $this->_requestHeaders[strtolower($name)] = $value; } /** * Removes a request header * * @param string Header name to remove * @access public */ function removeHeader($name) { if (isset($this->_requestHeaders[strtolower($name)])) { unset($this->_requestHeaders[strtolower($name)]); } } /** * Adds a querystring parameter * * @param string Querystring parameter name * @param string Querystring parameter value * @param bool Whether the value is already urlencoded or not, default = not * @access public */ function addQueryString($name, $value, $preencoded = false) { $this->_url->addQueryString($name, $value, $preencoded); } /** * Sets the querystring to literally what you supply * * @param string The querystring data. Should be of the format foo=bar&x=y etc * @param bool Whether data is already urlencoded or not, default = already encoded * @access public */ function addRawQueryString($querystring, $preencoded = true) { $this->_url->addRawQueryString($querystring, $preencoded); } /** * Adds postdata items * * @param string Post data name * @param string Post data value * @param bool Whether data is already urlencoded or not, default = not * @access public */ function addPostData($name, $value, $preencoded = false) { if ($preencoded) { $this->_postData[$name] = $value; } else { $this->_postData[$name] = $this->_arrayMapRecursive('urlencode', $value); } } /** * Recursively applies the callback function to the value * * @param mixed Callback function * @param mixed Value to process * @access private * @return mixed Processed value */ function _arrayMapRecursive($callback, $value) { if (!is_array($value)) { return call_user_func($callback, $value); } else { $map = array(); foreach ($value as $k => $v) { $map[$k] = $this->_arrayMapRecursive($callback, $v); } return $map; } } /** * Adds a file to upload * * This also changes content-type to 'multipart/form-data' for proper upload * * @access public * @param string name of file-upload field * @param mixed file name(s) * @param mixed content-type(s) of file(s) being uploaded * @return bool true on success * @throws PEAR_Error */ function addFile($inputName, $fileName, $contentType = 'application/octet-stream') { if (!is_array($fileName) && !is_readable($fileName)) { return PEAR::raiseError("File '{$fileName}' is not readable"); } elseif (is_array($fileName)) { foreach ($fileName as $name) { if (!is_readable($name)) { return PEAR::raiseError("File '{$name}' is not readable"); } } } $this->addHeader('Content-Type', 'multipart/form-data'); $this->_postFiles[$inputName] = array( 'name' => $fileName, 'type' => $contentType ); return true; } /** * Adds raw postdata (DEPRECATED) * * @param string The data * @param bool Whether data is preencoded or not, default = already encoded * @access public * @deprecated deprecated since 1.3.0, method addBody() should be used instead */ function addRawPostData($postdata, $preencoded = true) { $this->_body = $preencoded ? $postdata : urlencode($postdata); } /** * Sets the request body (for POST, PUT and similar requests) * * @param string Request body * @access public */ function setBody($body) { $this->_body = $body; } /** * Clears any postdata that has been added (DEPRECATED). * * Useful for multiple request scenarios. * * @access public * @deprecated deprecated since 1.2 */ function clearPostData() { $this->_postData = null; } /** * Appends a cookie to "Cookie:" header * * @param string $name cookie name * @param string $value cookie value * @access public */ function addCookie($name, $value) { $cookies = isset($this->_requestHeaders['cookie']) ? $this->_requestHeaders['cookie']. '; ' : ''; $this->addHeader('Cookie', $cookies . $name . '=' . $value); } /** * Clears any cookies that have been added (DEPRECATED). * * Useful for multiple request scenarios * * @access public * @deprecated deprecated since 1.2 */ function clearCookies() { $this->removeHeader('Cookie'); } /** * Sends the request * * @access public * @param bool Whether to store response body in Response object property, * set this to false if downloading a LARGE file and using a Listener * @return mixed PEAR error on error, true otherwise */ function sendRequest($saveBody = true) { if (!is_a($this->_url, 'Net_URL')) { return PEAR::raiseError('No URL given.'); } $host = isset($this->_proxy_host) ? $this->_proxy_host : $this->_url->host; $port = isset($this->_proxy_port) ? $this->_proxy_port : $this->_url->port; // 4.3.0 supports SSL connections using OpenSSL. The function test determines // we running on at least 4.3.0 if (strcasecmp($this->_url->protocol, 'https') == 0 AND function_exists('file_get_contents') AND extension_loaded('openssl')) { if (isset($this->_proxy_host)) { return PEAR::raiseError('HTTPS proxies are not supported.'); } $host = 'ssl://' . $host; } // magic quotes may fuck up file uploads and chunked response processing $magicQuotes = ini_get('magic_quotes_runtime'); ini_set('magic_quotes_runtime', false); // If this is a second request, we may get away without // re-connecting if they're on the same server $err = $this->_sock->connect($host, $port, null, $this->_timeout, $this->_socketOptions); PEAR::isError($err) or $err = $this->_sock->write($this->_buildRequest()); if (!PEAR::isError($err)) { if (!empty($this->_readTimeout)) { $this->_sock->setTimeout($this->_readTimeout[0], $this->_readTimeout[1]); } $this->_notify('sentRequest'); // Read the response $this->_response = &new HTTP_Response($this->_sock, $this->_listeners); $err = $this->_response->process($this->_saveBody && $saveBody); } ini_set('magic_quotes_runtime', $magicQuotes); if (PEAR::isError($err)) { return $err; } // Check for redirection if ( $this->_allowRedirects AND $this->_redirects <= $this->_maxRedirects AND $this->getResponseCode() > 300 AND $this->getResponseCode() < 399 AND !empty($this->_response->_headers['location'])) { $redirect = $this->_response->_headers['location']; // Absolute URL if (preg_match('/^https?:\/\//i', $redirect)) { $this->_url = &new Net_URL($redirect); $this->addHeader('Host', $this->_generateHostHeader()); // Absolute path } elseif ($redirect{0} == '/') { $this->_url->path = $redirect; // Relative path } elseif (substr($redirect, 0, 3) == '../' OR substr($redirect, 0, 2) == './') { if (substr($this->_url->path, -1) == '/') { $redirect = $this->_url->path . $redirect; } else { $redirect = dirname($this->_url->path) . '/' . $redirect; } $redirect = Net_URL::resolvePath($redirect); $this->_url->path = $redirect; // Filename, no path } else { if (substr($this->_url->path, -1) == '/') { $redirect = $this->_url->path . $redirect; } else { $redirect = dirname($this->_url->path) . '/' . $redirect; } $this->_url->path = $redirect; } $this->_redirects++; return $this->sendRequest($saveBody); // Too many redirects } elseif ($this->_allowRedirects AND $this->_redirects > $this->_maxRedirects) { return PEAR::raiseError('Too many redirects'); } $this->_sock->disconnect(); return true; } /** * Returns the response code * * @access public * @return mixed Response code, false if not set */ function getResponseCode() { return isset($this->_response->_code) ? $this->_response->_code : false; } /** * Returns either the named header or all if no name given * * @access public * @param string The header name to return, do not set to get all headers * @return mixed either the value of $headername (false if header is not present) * or an array of all headers */ function getResponseHeader($headername = null) { if (!isset($headername)) { return isset($this->_response->_headers)? $this->_response->_headers: array(); } else { $headername = strtolower($headername); return isset($this->_response->_headers[$headername]) ? $this->_response->_headers[$headername] : false; } } /** * Returns the body of the response * * @access public * @return mixed response body, false if not set */ function getResponseBody() { return isset($this->_response->_body) ? $this->_response->_body : false; } /** * Returns cookies set in response * * @access public * @return mixed array of response cookies, false if none are present */ function getResponseCookies() { return isset($this->_response->_cookies) ? $this->_response->_cookies : false; } /** * Builds the request string * * @access private * @return string The request string */ function _buildRequest() { $separator = ini_get('arg_separator.output'); ini_set('arg_separator.output', '&'); $querystring = ($querystring = $this->_url->getQueryString()) ? '?' . $querystring : ''; ini_set('arg_separator.output', $separator); $host = isset($this->_proxy_host) ? $this->_url->protocol . '://' . $this->_url->host : ''; $port = (isset($this->_proxy_host) AND $this->_url->port != 80) ? ':' . $this->_url->port : ''; $path = (empty($this->_url->path)? '/': $this->_url->path) . $querystring; $url = $host . $port . $path; $request = $this->_method . ' ' . $url . ' HTTP/' . $this->_http . "\r\n"; if (in_array($this->_method, $this->_bodyDisallowed) || (HTTP_REQUEST_METHOD_POST != $this->_method && empty($this->_body)) || (HTTP_REQUEST_METHOD_POST != $this->_method && empty($this->_postData) && empty($this->_postFiles))) { $this->removeHeader('Content-Type'); } else { if (empty($this->_requestHeaders['content-type'])) { // Add default content-type $this->addHeader('Content-Type', 'application/x-www-form-urlencoded'); } elseif ('multipart/form-data' == $this->_requestHeaders['content-type']) { $boundary = 'HTTP_Request_' . md5(uniqid('request') . microtime()); $this->addHeader('Content-Type', 'multipart/form-data; boundary=' . $boundary); } } // Request Headers if (!empty($this->_requestHeaders)) { foreach ($this->_requestHeaders as $name => $value) { $canonicalName = implode('-', array_map('ucfirst', explode('-', $name))); $request .= $canonicalName . ': ' . $value . "\r\n"; } } // No post data or wrong method, so simply add a final CRLF if (in_array($this->_method, $this->_bodyDisallowed) || (HTTP_REQUEST_METHOD_POST != $this->_method && empty($this->_body))) { $request .= "\r\n"; // Post data if it's an array } elseif (HTTP_REQUEST_METHOD_POST == $this->_method && (!empty($this->_postData) || !empty($this->_postFiles))) { // "normal" POST request if (!isset($boundary)) { $postdata = implode('&', array_map( create_function('$a', 'return $a[0] . \'=\' . $a[1];'), $this->_flattenArray('', $this->_postData) )); // multipart request, probably with file uploads } else { $postdata = ''; if (!empty($this->_postData)) { $flatData = $this->_flattenArray('', $this->_postData); foreach ($flatData as $item) { $postdata .= '--' . $boundary . "\r\n"; $postdata .= 'Content-Disposition: form-data; name="' . $item[0] . '"'; $postdata .= "\r\n\r\n" . urldecode($item[1]) . "\r\n"; } } foreach ($this->_postFiles as $name => $value) { if (is_array($value['name'])) { $varname = $name . ($this->_useBrackets? '[]': ''); } else { $varname = $name; $value['name'] = array($value['name']); } foreach ($value['name'] as $key => $filename) { $fp = fopen($filename, 'r'); $data = fread($fp, filesize($filename)); fclose($fp); $basename = basename($filename); $type = is_array($value['type'])? @$value['type'][$key]: $value['type']; $postdata .= '--' . $boundary . "\r\n"; $postdata .= 'Content-Disposition: form-data; name="' . $varname . '"; filename="' . $basename . '"'; $postdata .= "\r\nContent-Type: " . $type; $postdata .= "\r\n\r\n" . $data . "\r\n"; } } $postdata .= '--' . $boundary . "--\r\n"; } $request .= 'Content-Length: ' . strlen($postdata) . "\r\n\r\n"; $request .= $postdata; // Explicitly set request body } elseif (!empty($this->_body)) { $request .= 'Content-Length: ' . strlen($this->_body) . "\r\n\r\n"; $request .= $this->_body; } return $request; } /** * Helper function to change the (probably multidimensional) associative array * into the simple one. * * @param string name for item * @param mixed item's values * @return array array with the following items: array('item name', 'item value'); */ function _flattenArray($name, $values) { if (!is_array($values)) { return array(array($name, $values)); } else { $ret = array(); foreach ($values as $k => $v) { if (empty($name)) { $newName = $k; } elseif ($this->_useBrackets) { $newName = $name . '[' . $k . ']'; } else { $newName = $name; } $ret = array_merge($ret, $this->_flattenArray($newName, $v)); } return $ret; } } /** * Adds a Listener to the list of listeners that are notified of * the object's events * * @param object HTTP_Request_Listener instance to attach * @return boolean whether the listener was successfully attached * @access public */ function attach(&$listener) { if (!is_a($listener, 'HTTP_Request_Listener')) { return false; } $this->_listeners[$listener->getId()] =& $listener; return true; } /** * Removes a Listener from the list of listeners * * @param object HTTP_Request_Listener instance to detach * @return boolean whether the listener was successfully detached * @access public */ function detach(&$listener) { if (!is_a($listener, 'HTTP_Request_Listener') || !isset($this->_listeners[$listener->getId()])) { return false; } unset($this->_listeners[$listener->getId()]); return true; } /** * Notifies all registered listeners of an event. * * Events sent by HTTP_Request object * 'sentRequest': after the request was sent * Events sent by HTTP_Response object * 'gotHeaders': after receiving response headers (headers are passed in $data) * 'tick': on receiving a part of response body (the part is passed in $data) * 'gzTick': on receiving a gzip-encoded part of response body (ditto) * 'gotBody': after receiving the response body (passes the decoded body in $data if it was gzipped) * * @param string Event name * @param mixed Additional data * @access private */ function _notify($event, $data = null) { foreach (array_keys($this->_listeners) as $id) { $this->_listeners[$id]->update($this, $event, $data); } } } /** * Response class to complement the Request class */ class HTTP_Response { /** * Socket object * @var object */ var $_sock; /** * Protocol * @var string */ var $_protocol; /** * Return code * @var string */ var $_code; /** * Response headers * @var array */ var $_headers; /** * Cookies set in response * @var array */ var $_cookies; /** * Response body * @var string */ var $_body = ''; /** * Used by _readChunked(): remaining length of the current chunk * @var string */ var $_chunkLength = 0; /** * Attached listeners * @var array */ var $_listeners = array(); /** * Constructor * * @param object Net_Socket socket to read the response from * @param array listeners attached to request * @return mixed PEAR Error on error, true otherwise */ function HTTP_Response(&$sock, &$listeners) { $this->_sock =& $sock; $this->_listeners =& $listeners; } /** * Processes a HTTP response * * This extracts response code, headers, cookies and decodes body if it * was encoded in some way * * @access public * @param bool Whether to store response body in object property, set * this to false if downloading a LARGE file and using a Listener. * This is assumed to be true if body is gzip-encoded. * @throws PEAR_Error * @return mixed true on success, PEAR_Error in case of malformed response */ function process($saveBody = true) { do { $line = $this->_sock->readLine(); if (sscanf($line, 'HTTP/%s %s', $http_version, $returncode) != 2) { return PEAR::raiseError('Malformed response.'); } else { $this->_protocol = 'HTTP/' . $http_version; $this->_code = intval($returncode); } while ('' !== ($header = $this->_sock->readLine())) { $this->_processHeader($header); } } while (100 == $this->_code); $this->_notify('gotHeaders', $this->_headers); // If response body is present, read it and decode $chunked = isset($this->_headers['transfer-encoding']) && ('chunked' == $this->_headers['transfer-encoding']); $gzipped = isset($this->_headers['content-encoding']) && ('gzip' == $this->_headers['content-encoding']); $hasBody = false; if (!isset($this->_headers['content-length']) || 0 != $this->_headers['content-length']) { while (!$this->_sock->eof()) { if ($chunked) { $data = $this->_readChunked(); } else { $data = $this->_sock->read(4096); } if ('' == $data) { break; } else { $hasBody = true; if ($saveBody || $gzipped) { $this->_body .= $data; } $this->_notify($gzipped? 'gzTick': 'tick', $data); } } } if ($hasBody) { // Uncompress the body if needed if ($gzipped) { $this->_body = gzinflate(substr($this->_body, 10)); $this->_notify('gotBody', $this->_body); } else { $this->_notify('gotBody'); } } return true; } /** * Processes the response header * * @access private * @param string HTTP header */ function _processHeader($header) { list($headername, $headervalue) = explode(':', $header, 2); $headername = strtolower($headername); $headervalue = ltrim($headervalue); if ('set-cookie' != $headername) { if (isset($this->_headers[$headername])) { $this->_headers[$headername] .= ',' . $headervalue; } else { $this->_headers[$headername] = $headervalue; } } else { $this->_parseCookie($headervalue); } } /** * Parse a Set-Cookie header to fill $_cookies array * * @access private * @param string value of Set-Cookie header */ function _parseCookie($headervalue) { $cookie = array( 'expires' => null, 'domain' => null, 'path' => null, 'secure' => false ); // Only a name=value pair if (!strpos($headervalue, ';')) { $pos = strpos($headervalue, '='); $cookie['name'] = trim(substr($headervalue, 0, $pos)); $cookie['value'] = trim(substr($headervalue, $pos + 1)); // Some optional parameters are supplied } else { $elements = explode(';', $headervalue); $pos = strpos($elements[0], '='); $cookie['name'] = trim(substr($elements[0], 0, $pos)); $cookie['value'] = trim(substr($elements[0], $pos + 1)); for ($i = 1; $i < count($elements); $i++) { if (false === strpos($elements[$i], '=')) { $elName = trim($elements[$i]); $elValue = null; } else { list ($elName, $elValue) = array_map('trim', explode('=', $elements[$i])); } $elName = strtolower($elName); if ('secure' == $elName) { $cookie['secure'] = true; } elseif ('expires' == $elName) { $cookie['expires'] = str_replace('"', '', $elValue); } elseif ('path' == $elName || 'domain' == $elName) { $cookie[$elName] = urldecode($elValue); } else { $cookie[$elName] = $elValue; } } } $this->_cookies[] = $cookie; } /** * Read a part of response body encoded with chunked Transfer-Encoding * * @access private * @return string */ function _readChunked() { // at start of the next chunk? if (0 == $this->_chunkLength) { $line = $this->_sock->readLine(); if (preg_match('/^([0-9a-f]+)/i', $line, $matches)) { $this->_chunkLength = hexdec($matches[1]); // Chunk with zero length indicates the end if (0 == $this->_chunkLength) { $this->_sock->readLine(); // make this an eof() return ''; } } else { return ''; } } $data = $this->_sock->read($this->_chunkLength); $this->_chunkLength -= strlen($data); if (0 == $this->_chunkLength) { $this->_sock->readLine(); // Trailing CRLF } return $data; } /** * Notifies all registered listeners of an event. * * @param string Event name * @param mixed Additional data * @access private * @see HTTP_Request::_notify() */ function _notify($event, $data = null) { foreach (array_keys($this->_listeners) as $id) { $this->_listeners[$id]->update($this, $event, $data); } } } // End class HTTP_Response ?>
123gohelmetsv2
trunk/lib/paypal-sdk/HTTP/Request.php
PHP
asf20
38,753
<?php // +-----------------------------------------------------------------------+ // | Copyright (c) 2002-2004, Richard Heyes | // | All rights reserved. | // | | // | Redistribution and use in source and binary forms, with or without | // | modification, are permitted provided that the following conditions | // | are met: | // | | // | o Redistributions of source code must retain the above copyright | // | notice, this list of conditions and the following disclaimer. | // | o Redistributions in binary form must reproduce the above copyright | // | notice, this list of conditions and the following disclaimer in the | // | documentation and/or other materials provided with the distribution.| // | o The names of the authors may not be used to endorse or promote | // | products derived from this software without specific prior written | // | permission. | // | | // | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | // | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | // | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | // | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | // | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | // | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | // | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | // | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | // | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | // | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | // | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | // | | // +-----------------------------------------------------------------------+ // | Author: Richard Heyes <richard at php net> | // +-----------------------------------------------------------------------+ // // $Id: URL.php,v 1.1 2011/09/18 05:15:56 iling Exp $ // // Net_URL Class class Net_URL { /** * Full url * @var string */ var $url; /** * Protocol * @var string */ var $protocol; /** * Username * @var string */ var $username; /** * Password * @var string */ var $password; /** * Host * @var string */ var $host; /** * Port * @var integer */ var $port; /** * Path * @var string */ var $path; /** * Query string * @var array */ var $querystring; /** * Anchor * @var string */ var $anchor; /** * Whether to use [] * @var bool */ var $useBrackets; /** * PHP4 Constructor * * @see __construct() */ function Net_URL($url = null, $useBrackets = true) { $this->__construct($url, $useBrackets); } /** * PHP5 Constructor * * Parses the given url and stores the various parts * Defaults are used in certain cases * * @param string $url Optional URL * @param bool $useBrackets Whether to use square brackets when * multiple querystrings with the same name * exist */ function __construct($url = null, $useBrackets = true) { $HTTP_SERVER_VARS = !empty($_SERVER) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS']; $this->useBrackets = $useBrackets; $this->url = $url; $this->user = ''; $this->pass = ''; $this->host = ''; $this->port = 80; $this->path = ''; $this->querystring = array(); $this->anchor = ''; // Only use defaults if not an absolute URL given if (!preg_match('/^[a-z0-9]+:\/\//i', $url)) { $this->protocol = (@$HTTP_SERVER_VARS['HTTPS'] == 'on' ? 'https' : 'http'); /** * Figure out host/port */ if (!empty($HTTP_SERVER_VARS['HTTP_HOST']) AND preg_match('/^(.*)(:([0-9]+))?$/U', $HTTP_SERVER_VARS['HTTP_HOST'], $matches)) { $host = $matches[1]; if (!empty($matches[3])) { $port = $matches[3]; } else { $port = $this->getStandardPort($this->protocol); } } $this->user = ''; $this->pass = ''; $this->host = !empty($host) ? $host : (isset($HTTP_SERVER_VARS['SERVER_NAME']) ? $HTTP_SERVER_VARS['SERVER_NAME'] : 'localhost'); $this->port = !empty($port) ? $port : (isset($HTTP_SERVER_VARS['SERVER_PORT']) ? $HTTP_SERVER_VARS['SERVER_PORT'] : $this->getStandardPort($this->protocol)); $this->path = !empty($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : '/'; $this->querystring = isset($HTTP_SERVER_VARS['QUERY_STRING']) ? $this->_parseRawQuerystring($HTTP_SERVER_VARS['QUERY_STRING']) : null; $this->anchor = ''; } // Parse the url and store the various parts if (!empty($url)) { $urlinfo = parse_url($url); // Default querystring $this->querystring = array(); foreach ($urlinfo as $key => $value) { switch ($key) { case 'scheme': $this->protocol = $value; $this->port = $this->getStandardPort($value); break; case 'user': case 'pass': case 'host': case 'port': $this->$key = $value; break; case 'path': if ($value{0} == '/') { $this->path = $value; } else { $path = dirname($this->path) == DIRECTORY_SEPARATOR ? '' : dirname($this->path); $this->path = sprintf('%s/%s', $path, $value); } break; case 'query': $this->querystring = $this->_parseRawQueryString($value); break; case 'fragment': $this->anchor = $value; break; } } } } /** * Returns full url * * @return string Full url * @access public */ function getURL() { $querystring = $this->getQueryString(); $this->url = $this->protocol . '://' . $this->user . (!empty($this->pass) ? ':' : '') . $this->pass . (!empty($this->user) ? '@' : '') . $this->host . ($this->port == $this->getStandardPort($this->protocol) ? '' : ':' . $this->port) . $this->path . (!empty($querystring) ? '?' . $querystring : '') . (!empty($this->anchor) ? '#' . $this->anchor : ''); return $this->url; } /** * Adds a querystring item * * @param string $name Name of item * @param string $value Value of item * @param bool $preencoded Whether value is urlencoded or not, default = not * @access public */ function addQueryString($name, $value, $preencoded = false) { if ($preencoded) { $this->querystring[$name] = $value; } else { $this->querystring[$name] = is_array($value) ? array_map('rawurlencode', $value): rawurlencode($value); } } /** * Removes a querystring item * * @param string $name Name of item * @access public */ function removeQueryString($name) { if (isset($this->querystring[$name])) { unset($this->querystring[$name]); } } /** * Sets the querystring to literally what you supply * * @param string $querystring The querystring data. Should be of the format foo=bar&x=y etc * @access public */ function addRawQueryString($querystring) { $this->querystring = $this->_parseRawQueryString($querystring); } /** * Returns flat querystring * * @return string Querystring * @access public */ function getQueryString() { if (!empty($this->querystring)) { foreach ($this->querystring as $name => $value) { if (is_array($value)) { foreach ($value as $k => $v) { $querystring[] = $this->useBrackets ? sprintf('%s[%s]=%s', $name, $k, $v) : ($name . '=' . $v); } } elseif (!is_null($value)) { $querystring[] = $name . '=' . $value; } else { $querystring[] = $name; } } $querystring = implode(ini_get('arg_separator.output'), $querystring); } else { $querystring = ''; } return $querystring; } /** * Parses raw querystring and returns an array of it * * @param string $querystring The querystring to parse * @return array An array of the querystring data * @access private */ function _parseRawQuerystring($querystring) { $parts = preg_split('/[' . preg_quote(ini_get('arg_separator.input'), '/') . ']/', $querystring, -1, PREG_SPLIT_NO_EMPTY); $return = array(); foreach ($parts as $part) { if (strpos($part, '=') !== false) { $value = substr($part, strpos($part, '=') + 1); $key = substr($part, 0, strpos($part, '=')); } else { $value = null; $key = $part; } if (substr($key, -2) == '[]') { $key = substr($key, 0, -2); if (@!is_array($return[$key])) { $return[$key] = array(); $return[$key][] = $value; } else { $return[$key][] = $value; } } elseif (!$this->useBrackets AND !empty($return[$key])) { $return[$key] = (array)$return[$key]; $return[$key][] = $value; } else { $return[$key] = $value; } } return $return; } /** * Resolves //, ../ and ./ from a path and returns * the result. Eg: * * /foo/bar/../boo.php => /foo/boo.php * /foo/bar/../../boo.php => /boo.php * /foo/bar/.././/boo.php => /foo/boo.php * * This method can also be called statically. * * @param string $url URL path to resolve * @return string The result */ function resolvePath($path) { $path = explode('/', str_replace('//', '/', $path)); for ($i=0; $i<count($path); $i++) { if ($path[$i] == '.') { unset($path[$i]); $path = array_values($path); $i--; } elseif ($path[$i] == '..' AND ($i > 1 OR ($i == 1 AND $path[0] != '') ) ) { unset($path[$i]); unset($path[$i-1]); $path = array_values($path); $i -= 2; } elseif ($path[$i] == '..' AND $i == 1 AND $path[0] == '') { unset($path[$i]); $path = array_values($path); $i--; } else { continue; } } return implode('/', $path); } /** * Returns the standard port number for a protocol * * @param string $scheme The protocol to lookup * @return integer Port number or NULL if no scheme matches * * @author Philippe Jausions <Philippe.Jausions@11abacus.com> */ function getStandardPort($scheme) { switch (strtolower($scheme)) { case 'http': return 80; case 'https': return 443; case 'ftp': return 21; case 'imap': return 143; case 'imaps': return 993; case 'pop3': return 110; case 'pop3s': return 995; default: return null; } } /** * Forces the URL to a particular protocol * * @param string $protocol Protocol to force the URL to * @param integer $port Optional port (standard port is used by default) */ function setProtocol($protocol, $port = null) { $this->protocol = $protocol; $this->port = is_null($port) ? $this->getStandardPort() : $port; } } ?>
123gohelmetsv2
trunk/lib/paypal-sdk/Net/URL.php
PHP
asf20
13,721
<?php // // +----------------------------------------------------------------------+ // | PHP Version 4 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997-2003 The PHP Group | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | // | available at through the world-wide-web at | // | http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // | Authors: Stig Bakken <ssb@php.net> | // | Chuck Hagenbuch <chuck@horde.org> | // +----------------------------------------------------------------------+ // // $Id: Socket.php,v 1.1 2011/09/18 05:15:56 iling Exp $ require_once 'PEAR.php'; define('NET_SOCKET_READ', 1); define('NET_SOCKET_WRITE', 2); define('NET_SOCKET_ERROR', 3); /** * Generalized Socket class. * * @version 1.1 * @author Stig Bakken <ssb@php.net> * @author Chuck Hagenbuch <chuck@horde.org> */ class Net_Socket extends PEAR { /** * Socket file pointer. * @var resource $fp */ var $fp = null; /** * Whether the socket is blocking. Defaults to true. * @var boolean $blocking */ var $blocking = true; /** * Whether the socket is persistent. Defaults to false. * @var boolean $persistent */ var $persistent = false; /** * The IP address to connect to. * @var string $addr */ var $addr = ''; /** * The port number to connect to. * @var integer $port */ var $port = 0; /** * Number of seconds to wait on socket connections before assuming * there's no more data. Defaults to no timeout. * @var integer $timeout */ var $timeout = false; /** * Number of bytes to read at a time in readLine() and * readAll(). Defaults to 2048. * @var integer $lineLength */ var $lineLength = 2048; /** * Connect to the specified port. If called when the socket is * already connected, it disconnects and connects again. * * @param string $addr IP address or host name. * @param integer $port TCP port number. * @param boolean $persistent (optional) Whether the connection is * persistent (kept open between requests * by the web server). * @param integer $timeout (optional) How long to wait for data. * @param array $options See options for stream_context_create. * * @access public * * @return boolean | PEAR_Error True on success or a PEAR_Error on failure. */ function connect($addr, $port = 0, $persistent = null, $timeout = null, $options = null) { if (is_resource($this->fp)) { @fclose($this->fp); $this->fp = null; } if (!$addr) { return $this->raiseError('$addr cannot be empty'); } elseif (strspn($addr, '.0123456789') == strlen($addr) || strstr($addr, '/') !== false) { $this->addr = $addr; } else { $this->addr = @gethostbyname($addr); } $this->port = $port % 65536; if ($persistent !== null) { $this->persistent = $persistent; } if ($timeout !== null) { $this->timeout = $timeout; } $openfunc = $this->persistent ? 'pfsockopen' : 'fsockopen'; $errno = 0; $errstr = ''; if ($options && function_exists('stream_context_create')) { if ($this->timeout) { $timeout = $this->timeout; } else { $timeout = 0; } $context = stream_context_create($options); $fp = @$openfunc($this->addr, $this->port, $errno, $errstr, $timeout, $context); } else { if ($this->timeout) { $fp = @$openfunc($this->addr, $this->port, $errno, $errstr, $this->timeout); } else { $fp = @$openfunc($this->addr, $this->port, $errno, $errstr); } } if (!$fp) { return $this->raiseError($errstr, $errno); } $this->fp = $fp; return $this->setBlocking($this->blocking); } /** * Disconnects from the peer, closes the socket. * * @access public * @return mixed true on success or an error object otherwise */ function disconnect() { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } @fclose($this->fp); $this->fp = null; return true; } /** * Find out if the socket is in blocking mode. * * @access public * @return boolean The current blocking mode. */ function isBlocking() { return $this->blocking; } /** * Sets whether the socket connection should be blocking or * not. A read call to a non-blocking socket will return immediately * if there is no data available, whereas it will block until there * is data for blocking sockets. * * @param boolean $mode True for blocking sockets, false for nonblocking. * @access public * @return mixed true on success or an error object otherwise */ function setBlocking($mode) { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } $this->blocking = $mode; socket_set_blocking($this->fp, $this->blocking); return true; } /** * Sets the timeout value on socket descriptor, * expressed in the sum of seconds and microseconds * * @param integer $seconds Seconds. * @param integer $microseconds Microseconds. * @access public * @return mixed true on success or an error object otherwise */ function setTimeout($seconds, $microseconds) { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } return socket_set_timeout($this->fp, $seconds, $microseconds); } /** * Returns information about an existing socket resource. * Currently returns four entries in the result array: * * <p> * timed_out (bool) - The socket timed out waiting for data<br> * blocked (bool) - The socket was blocked<br> * eof (bool) - Indicates EOF event<br> * unread_bytes (int) - Number of bytes left in the socket buffer<br> * </p> * * @access public * @return mixed Array containing information about existing socket resource or an error object otherwise */ function getStatus() { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } return socket_get_status($this->fp); } /** * Get a specified line of data * * @access public * @return $size bytes of data from the socket, or a PEAR_Error if * not connected. */ function gets($size) { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } return @fgets($this->fp, $size); } /** * Read a specified amount of data. This is guaranteed to return, * and has the added benefit of getting everything in one fread() * chunk; if you know the size of the data you're getting * beforehand, this is definitely the way to go. * * @param integer $size The number of bytes to read from the socket. * @access public * @return $size bytes of data from the socket, or a PEAR_Error if * not connected. */ function read($size) { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } return @fread($this->fp, $size); } /** * Write a specified amount of data. * * @param string $data Data to write. * @param integer $blocksize Amount of data to write at once. * NULL means all at once. * * @access public * @return mixed true on success or an error object otherwise */ function write($data, $blocksize = null) { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } if (is_null($blocksize) && !OS_WINDOWS) { return fwrite($this->fp, $data); } else { if (is_null($blocksize)) { $blocksize = 1024; } $pos = 0; $size = strlen($data); while ($pos < $size) { $written = @fwrite($this->fp, substr($data, $pos, $blocksize)); if ($written === false) { return false; } $pos += $written; } return $pos; } } /** * Write a line of data to the socket, followed by a trailing "\r\n". * * @access public * @return mixed fputs result, or an error */ function writeLine($data) { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } return fwrite($this->fp, $data . "\r\n"); } /** * Tests for end-of-file on a socket descriptor. * * @access public * @return bool */ function eof() { return (is_resource($this->fp) && feof($this->fp)); } /** * Reads a byte of data * * @access public * @return 1 byte of data from the socket, or a PEAR_Error if * not connected. */ function readByte() { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } return ord(@fread($this->fp, 1)); } /** * Reads a word of data * * @access public * @return 1 word of data from the socket, or a PEAR_Error if * not connected. */ function readWord() { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } $buf = @fread($this->fp, 2); return (ord($buf[0]) + (ord($buf[1]) << 8)); } /** * Reads an int of data * * @access public * @return integer 1 int of data from the socket, or a PEAR_Error if * not connected. */ function readInt() { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } $buf = @fread($this->fp, 4); return (ord($buf[0]) + (ord($buf[1]) << 8) + (ord($buf[2]) << 16) + (ord($buf[3]) << 24)); } /** * Reads a zero-terminated string of data * * @access public * @return string, or a PEAR_Error if * not connected. */ function readString() { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } $string = ''; while (($char = @fread($this->fp, 1)) != "\x00") { $string .= $char; } return $string; } /** * Reads an IP Address and returns it in a dot formated string * * @access public * @return Dot formated string, or a PEAR_Error if * not connected. */ function readIPAddress() { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } $buf = @fread($this->fp, 4); return sprintf("%s.%s.%s.%s", ord($buf[0]), ord($buf[1]), ord($buf[2]), ord($buf[3])); } /** * Read until either the end of the socket or a newline, whichever * comes first. Strips the trailing newline from the returned data. * * @access public * @return All available data up to a newline, without that * newline, or until the end of the socket, or a PEAR_Error if * not connected. */ function readLine() { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } $line = ''; $timeout = time() + $this->timeout; while (!feof($this->fp) && (!$this->timeout || time() < $timeout)) { $line .= @fgets($this->fp, $this->lineLength); if (substr($line, -1) == "\n") { return rtrim($line, "\r\n"); } } return $line; } /** * Read until the socket closes, or until there is no more data in * the inner PHP buffer. If the inner buffer is empty, in blocking * mode we wait for at least 1 byte of data. Therefore, in * blocking mode, if there is no data at all to be read, this * function will never exit (unless the socket is closed on the * remote end). * * @access public * * @return string All data until the socket closes, or a PEAR_Error if * not connected. */ function readAll() { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } $data = ''; while (!feof($this->fp)) { $data .= @fread($this->fp, $this->lineLength); } return $data; } /** * Runs the equivalent of the select() system call on the socket * with a timeout specified by tv_sec and tv_usec. * * @param integer $state Which of read/write/error to check for. * @param integer $tv_sec Number of seconds for timeout. * @param integer $tv_usec Number of microseconds for timeout. * * @access public * @return False if select fails, integer describing which of read/write/error * are ready, or PEAR_Error if not connected. */ function select($state, $tv_sec, $tv_usec = 0) { if (!is_resource($this->fp)) { return $this->raiseError('not connected'); } $read = null; $write = null; $except = null; if ($state & NET_SOCKET_READ) { $read[] = $this->fp; } if ($state & NET_SOCKET_WRITE) { $write[] = $this->fp; } if ($state & NET_SOCKET_ERROR) { $except[] = $this->fp; } if (false === ($sr = stream_select($read, $write, $except, $tv_sec, $tv_usec))) { return false; } $result = 0; if (count($read)) { $result |= NET_SOCKET_READ; } if (count($write)) { $result |= NET_SOCKET_WRITE; } if (count($except)) { $result |= NET_SOCKET_ERROR; } return $result; } }
123gohelmetsv2
trunk/lib/paypal-sdk/Net/Socket.php
PHP
asf20
15,881
<?php /** * Example PayPal SDK configuration file. */ /** * What level should we log at? Valid levels are: * PEAR_LOG_ERR - Log only severe errors. * PEAR_LOG_INFO - (default) Date/time of operation, operation name, elapsed time, success or failure indication. * PEAR_LOG_DEBUG - Full text of SOAP requests and responses and other debugging messages. * * See the PayPal SDK User Guide for more details on these log levels. */ $__PP_CONFIG['log_level'] = PEAR_LOG_DEBUG; /** * If we're logging, what directory should we create log files in? * Note that a log name coincides with a symlink, logging will *not* * be done to avoid security problems. File names are * <DateStamp>.PayPal.log. */ $__PP_CONFIG['log_dir'] = 'D:/workspace/123gohelmets_v2/logs'; /** * The path where custom profile storage handlers are located. * * IMPORTANT: Custom handler classes must be named ProfileHandler_<Handler Name> * and be stored in the file <Handler Name>.php within this directory */ $__PP_CONFIG['custom_handler_dir'] = array('/path/to/custom/handlers'); /** * Where Profile certificates will be stored. Must be writable by the * web server. */ $__PP_CONFIG['profile_cert_dir'] = '/tmp'; /** * The Location of the public Paypal certificate file */ $__PP_CONFIG['paypal_cert_file']['Live'] = '/path/to/cert/Livefile.crt'; $__PP_CONFIG['paypal_cert_file']['Sandbox'] = '/path/to/cert/Sandboxfile.crt';
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/conf/paypal-sdk.php
PHP
asf20
1,475
<?php /** * File containing the encryption services code. * * @package PayPal */ /** * Load files we depend on. */ require_once 'PayPal.php'; /** * API for doing PayPal encryption services. * * @package PayPal */ class EWPServices { /** * The profile to use for encryption. * * @access protected * * @var EWPProfile $_profile */ var $_profile; /** * Construct a new EWP services object. * * @param EWPProfile $profile The profile with the username, password, * and any other information necessary to use * the SDK. */ function EWPServices($profile) { $this->setEWPProfile($profile); } /** * Use a given profile. * * @param EWPProfile $profile The profile with the username, password, * and any other information necessary to use * the SDK. */ function setEWPProfile($profile) { $this->_profile = $profile; } /** * Get the current profile. * * @return EWPProfile The current profile. */ function getEWPProfile() { return $this->_profile; } /** * Creates a new encrypted button HTML block * * @param array The button parameters as key/value pairs * @return mixed A string of HTML or a Paypal error object on failure */ function encryptButton($buttonParams) { if (!is_object($this->_profile)) { return PayPal::raiseError("No Profile is set, cannot encrypt"); } $res = $this->_profile->validate(); if (PayPal::isError($res)) { return $res; } $merchant_cert = 'file://' . $this->_profile->getCertificateFile(); $merchant_key = 'file://' . $this->_profile->getPrivateKeyFile(); $enc_cert = 'file://' . $this->getPayPalCertificateFile($this->_profile->getEnvironment()); $tmpin_file = tempnam('/tmp', 'paypal_'); $tmpout_file = tempnam('/tmp', 'paypal_'); $tmpfinal_file = tempnam('/tmp', 'paypal_'); $rawdata = array(); $buttonParams['cert_id'] = $this->_profile->getCertificateId(); foreach ($buttonParams as $name => $value) { $rawdata[] = "$name=$value"; } $rawdata = implode("\n", $rawdata); $fp = fopen($tmpin_file, 'w'); if (!$fp) { return PayPal::raiseError("Could not open temporary file '$tmpin_file')"); } fwrite($fp, $rawdata); fclose($fp); if (!@openssl_pkcs7_sign($tmpin_file, $tmpout_file, $merchant_cert, array($merchant_key, $this->_profile->getPrivateKeyPassword()), array(), PKCS7_BINARY)) { return PayPal::raiseError("Could not sign encrypted data: " . openssl_error_string()); } $data = file_get_contents($tmpout_file); $data = explode("\n\n", $data); $data = $data[1]; $data = base64_decode($data); $fp = fopen($tmpout_file, 'w'); if (!$fp) { return PayPal::raiseError("Could not open temporary file '$tmpin_file')"); } fwrite($fp, $data); fclose($fp); if (!@openssl_pkcs7_encrypt($tmpout_file, $tmpfinal_file, $enc_cert, array(), PKCS7_BINARY)) { return PayPal::raiseError("Could not encrypt data:" . openssl_error_string()); } $encdata = @file_get_contents($tmpfinal_file, false); if (!$encdata) { return PayPal::raiseError("Encryption and signature of data failed."); } $encdata = explode("\n\n", $encdata); $encdata = trim(str_replace("\n", '', $encdata[1])); $encdata = "-----BEGIN PKCS7-----$encdata-----END PKCS7-----"; @unlink($tmpfinal_file); @unlink($tmpin_file); @unlink($tmpout_file); $action = $this->_profile->getUrl(); $buttonimgurl = $this->_profile->getButtonImage(); $retval = <<< PPHTML <FORM ACTION="$action" METHOD="post"> <INPUT TYPE="hidden" NAME="cmd" VALUE="_s-xclick"> <INPUT TYPE="hidden" NAME="encrypted" VALUE="$encdata"> <INPUT TYPE="image" SRC="$buttonimgurl" BORDER="0" NAME="submit" ALT="Make Payments with PayPal -- it's fast, free and secure!"> </FORM> PPHTML; return $retval; } /** * Returns the PayPal public certificate filename. * * @param string The environment to get the certificate for. * @return mixed The path and file of the certificate file, or a PayPal error object on failure. */ function getPayPalCertificateFile($environment) { $package_root = PayPal::getPackageRoot(); $cert = $package_root . '/cert/' . strtolower($environment) . '.paypal.com.pem'; if (@include "$package_root/conf/paypal-sdk.php") { if (isset($__PP_CONFIG['paypal_cert_file']) && !empty($__PP_CONFIG['paypal_cert_file'])) { $cert = $__PP_CONFIG['paypal_cert_file'][$environment]; } } if (!file_exists($cert)) { return PayPal::raiseError("Could not file Paypal public Certificate file '$cert'"); } return $cert; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/EWPServices.php
PHP
asf20
5,510
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/DoExpressCheckoutPaymentRequestType.php'; /** * DoUATPExpressCheckoutPaymentRequestType * * @package PayPal */ class DoUATPExpressCheckoutPaymentRequestType extends DoExpressCheckoutPaymentRequestType { function DoUATPExpressCheckoutPaymentRequestType() { parent::DoExpressCheckoutPaymentRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/DoUATPExpressCheckoutPaymentRequestType.php
PHP
asf20
497
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * ThreeDSecureRequestType * * The Common 3DS fields. Common for both GTD and DCC API's. * * @package PayPal */ class ThreeDSecureRequestType extends XSDSimpleType { var $Eci3ds; var $Cavv; var $Xid; var $MpiVendor3ds; var $AuthStatus3ds; function ThreeDSecureRequestType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'Eci3ds' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Cavv' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Xid' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'MpiVendor3ds' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'AuthStatus3ds' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getEci3ds() { return $this->Eci3ds; } function setEci3ds($Eci3ds, $charset = 'iso-8859-1') { $this->Eci3ds = $Eci3ds; $this->_elements['Eci3ds']['charset'] = $charset; } function getCavv() { return $this->Cavv; } function setCavv($Cavv, $charset = 'iso-8859-1') { $this->Cavv = $Cavv; $this->_elements['Cavv']['charset'] = $charset; } function getXid() { return $this->Xid; } function setXid($Xid, $charset = 'iso-8859-1') { $this->Xid = $Xid; $this->_elements['Xid']['charset'] = $charset; } function getMpiVendor3ds() { return $this->MpiVendor3ds; } function setMpiVendor3ds($MpiVendor3ds, $charset = 'iso-8859-1') { $this->MpiVendor3ds = $MpiVendor3ds; $this->_elements['MpiVendor3ds']['charset'] = $charset; } function getAuthStatus3ds() { return $this->AuthStatus3ds; } function setAuthStatus3ds($AuthStatus3ds, $charset = 'iso-8859-1') { $this->AuthStatus3ds = $AuthStatus3ds; $this->_elements['AuthStatus3ds']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/ThreeDSecureRequestType.php
PHP
asf20
2,872
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * UpdateRecurringPaymentsProfileRequestType * * @package PayPal */ class UpdateRecurringPaymentsProfileRequestType extends AbstractRequestType { var $UpdateRecurringPaymentsProfileRequestDetails; function UpdateRecurringPaymentsProfileRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'UpdateRecurringPaymentsProfileRequestDetails' => array ( 'required' => true, 'type' => 'UpdateRecurringPaymentsProfileRequestDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getUpdateRecurringPaymentsProfileRequestDetails() { return $this->UpdateRecurringPaymentsProfileRequestDetails; } function setUpdateRecurringPaymentsProfileRequestDetails($UpdateRecurringPaymentsProfileRequestDetails, $charset = 'iso-8859-1') { $this->UpdateRecurringPaymentsProfileRequestDetails = $UpdateRecurringPaymentsProfileRequestDetails; $this->_elements['UpdateRecurringPaymentsProfileRequestDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/UpdateRecurringPaymentsProfileRequestType.php
PHP
asf20
1,381
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * PaymentTransactionSearchResultType * * PaymentTransactionSearchResultType Results from a PaymentTransaction search * * @package PayPal */ class PaymentTransactionSearchResultType extends XSDSimpleType { /** * The date and time (in UTC/GMT format) the transaction occurred */ var $Timestamp; /** * The time zone of the transaction */ var $Timezone; /** * The type of the transaction */ var $Type; /** * The email address of the payer */ var $Payer; /** * Display name of the payer */ var $PayerDisplayName; /** * The transaction ID of the seller */ var $TransactionID; /** * The status of the transaction */ var $Status; /** * The total gross amount charged, including any profile shipping cost and taxes */ var $GrossAmount; /** * The fee that PayPal charged for the transaction */ var $FeeAmount; /** * The net amount of the transaction */ var $NetAmount; function PaymentTransactionSearchResultType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'Timestamp' => array ( 'required' => true, 'type' => 'dateTime', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Timezone' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Type' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Payer' => array ( 'required' => true, 'type' => 'EmailAddressType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PayerDisplayName' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'TransactionID' => array ( 'required' => true, 'type' => NULL, 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Status' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'GrossAmount' => array ( 'required' => true, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'FeeAmount' => array ( 'required' => true, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'NetAmount' => array ( 'required' => true, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getTimestamp() { return $this->Timestamp; } function setTimestamp($Timestamp, $charset = 'iso-8859-1') { $this->Timestamp = $Timestamp; $this->_elements['Timestamp']['charset'] = $charset; } function getTimezone() { return $this->Timezone; } function setTimezone($Timezone, $charset = 'iso-8859-1') { $this->Timezone = $Timezone; $this->_elements['Timezone']['charset'] = $charset; } function getType() { return $this->Type; } function setType($Type, $charset = 'iso-8859-1') { $this->Type = $Type; $this->_elements['Type']['charset'] = $charset; } function getPayer() { return $this->Payer; } function setPayer($Payer, $charset = 'iso-8859-1') { $this->Payer = $Payer; $this->_elements['Payer']['charset'] = $charset; } function getPayerDisplayName() { return $this->PayerDisplayName; } function setPayerDisplayName($PayerDisplayName, $charset = 'iso-8859-1') { $this->PayerDisplayName = $PayerDisplayName; $this->_elements['PayerDisplayName']['charset'] = $charset; } function getTransactionID() { return $this->TransactionID; } function setTransactionID($TransactionID, $charset = 'iso-8859-1') { $this->TransactionID = $TransactionID; $this->_elements['TransactionID']['charset'] = $charset; } function getStatus() { return $this->Status; } function setStatus($Status, $charset = 'iso-8859-1') { $this->Status = $Status; $this->_elements['Status']['charset'] = $charset; } function getGrossAmount() { return $this->GrossAmount; } function setGrossAmount($GrossAmount, $charset = 'iso-8859-1') { $this->GrossAmount = $GrossAmount; $this->_elements['GrossAmount']['charset'] = $charset; } function getFeeAmount() { return $this->FeeAmount; } function setFeeAmount($FeeAmount, $charset = 'iso-8859-1') { $this->FeeAmount = $FeeAmount; $this->_elements['FeeAmount']['charset'] = $charset; } function getNetAmount() { return $this->NetAmount; } function setNetAmount($NetAmount, $charset = 'iso-8859-1') { $this->NetAmount = $NetAmount; $this->_elements['NetAmount']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/PaymentTransactionSearchResultType.php
PHP
asf20
6,030
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * AccountEntryType * * @package PayPal */ class AccountEntryType extends XSDSimpleType { /** * Balance as of a given entry, can be 0.00. */ var $Balance; /** * Credit Amount for a detail entry, can be 0.00. */ var $Credit; /** * Date entry was posted, in GMT. */ var $Date; /** * Debit Amount for this detail entry, can be 0.00. */ var $Debit; /** * Item number if transaction is associated with an auction or 0 if no item is * associated with an account entry. */ var $ItemID; /** * Memo line for an account entry, can be empty string. */ var $Memo; /** * eBay reference number for an account entry. */ var $RefNumber; /** * Integer code for account details entry type. This element element specifies an * index to a table of explanations for accounting charges. */ var $AccountEntryDetailsType; function AccountEntryType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'Balance' => array ( 'required' => true, 'type' => NULL, 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Credit' => array ( 'required' => true, 'type' => 'AmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Date' => array ( 'required' => true, 'type' => 'dateTime', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Debit' => array ( 'required' => true, 'type' => 'AmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ItemID' => array ( 'required' => true, 'type' => NULL, 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Memo' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'RefNumber' => array ( 'required' => true, 'type' => 'int', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'AccountEntryDetailsType' => array ( 'required' => true, 'type' => 'int', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getBalance() { return $this->Balance; } function setBalance($Balance, $charset = 'iso-8859-1') { $this->Balance = $Balance; $this->_elements['Balance']['charset'] = $charset; } function getCredit() { return $this->Credit; } function setCredit($Credit, $charset = 'iso-8859-1') { $this->Credit = $Credit; $this->_elements['Credit']['charset'] = $charset; } function getDate() { return $this->Date; } function setDate($Date, $charset = 'iso-8859-1') { $this->Date = $Date; $this->_elements['Date']['charset'] = $charset; } function getDebit() { return $this->Debit; } function setDebit($Debit, $charset = 'iso-8859-1') { $this->Debit = $Debit; $this->_elements['Debit']['charset'] = $charset; } function getItemID() { return $this->ItemID; } function setItemID($ItemID, $charset = 'iso-8859-1') { $this->ItemID = $ItemID; $this->_elements['ItemID']['charset'] = $charset; } function getMemo() { return $this->Memo; } function setMemo($Memo, $charset = 'iso-8859-1') { $this->Memo = $Memo; $this->_elements['Memo']['charset'] = $charset; } function getRefNumber() { return $this->RefNumber; } function setRefNumber($RefNumber, $charset = 'iso-8859-1') { $this->RefNumber = $RefNumber; $this->_elements['RefNumber']['charset'] = $charset; } function getAccountEntryDetailsType() { return $this->AccountEntryDetailsType; } function setAccountEntryDetailsType($AccountEntryDetailsType, $charset = 'iso-8859-1') { $this->AccountEntryDetailsType = $AccountEntryDetailsType; $this->_elements['AccountEntryDetailsType']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/AccountEntryType.php
PHP
asf20
4,906
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractResponseType.php'; /** * ManagePendingTransactionStatusResponseType * * @package PayPal */ class ManagePendingTransactionStatusResponseType extends AbstractResponseType { var $TransactionID; var $Status; function ManagePendingTransactionStatusResponseType() { parent::AbstractResponseType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'TransactionID' => array ( 'required' => true, 'type' => 'TransactionId', 'namespace' => 'urn:ebay:api:PayPalAPI', ), 'Status' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), )); } function getTransactionID() { return $this->TransactionID; } function setTransactionID($TransactionID, $charset = 'iso-8859-1') { $this->TransactionID = $TransactionID; $this->_elements['TransactionID']['charset'] = $charset; } function getStatus() { return $this->Status; } function setStatus($Status, $charset = 'iso-8859-1') { $this->Status = $Status; $this->_elements['Status']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/ManagePendingTransactionStatusResponseType.php
PHP
asf20
1,505
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractResponseType.php'; /** * DoCaptureResponseType * * @package PayPal */ class DoCaptureResponseType extends AbstractResponseType { var $DoCaptureResponseDetails; function DoCaptureResponseType() { parent::AbstractResponseType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'DoCaptureResponseDetails' => array ( 'required' => true, 'type' => 'DoCaptureResponseDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getDoCaptureResponseDetails() { return $this->DoCaptureResponseDetails; } function setDoCaptureResponseDetails($DoCaptureResponseDetails, $charset = 'iso-8859-1') { $this->DoCaptureResponseDetails = $DoCaptureResponseDetails; $this->_elements['DoCaptureResponseDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/DoCaptureResponseType.php
PHP
asf20
1,124
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * ReferenceCreditCardDetailsType * * CreditCardDetailsType for DCC Reference Transaction Information about a Credit * Card. * * @package PayPal */ class ReferenceCreditCardDetailsType extends XSDSimpleType { var $CreditCardNumberType; var $ExpMonth; var $ExpYear; var $CardOwnerName; var $BillingAddress; var $CVV2; var $StartMonth; var $StartYear; var $IssueNumber; function ReferenceCreditCardDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'CreditCardNumberType' => array ( 'required' => false, 'type' => 'CreditCardNumberTypeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ExpMonth' => array ( 'required' => false, 'type' => 'int', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ExpYear' => array ( 'required' => false, 'type' => 'int', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'CardOwnerName' => array ( 'required' => false, 'type' => 'PersonNameType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'BillingAddress' => array ( 'required' => false, 'type' => 'AddressType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'CVV2' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'StartMonth' => array ( 'required' => false, 'type' => 'int', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'StartYear' => array ( 'required' => false, 'type' => 'int', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'IssueNumber' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getCreditCardNumberType() { return $this->CreditCardNumberType; } function setCreditCardNumberType($CreditCardNumberType, $charset = 'iso-8859-1') { $this->CreditCardNumberType = $CreditCardNumberType; $this->_elements['CreditCardNumberType']['charset'] = $charset; } function getExpMonth() { return $this->ExpMonth; } function setExpMonth($ExpMonth, $charset = 'iso-8859-1') { $this->ExpMonth = $ExpMonth; $this->_elements['ExpMonth']['charset'] = $charset; } function getExpYear() { return $this->ExpYear; } function setExpYear($ExpYear, $charset = 'iso-8859-1') { $this->ExpYear = $ExpYear; $this->_elements['ExpYear']['charset'] = $charset; } function getCardOwnerName() { return $this->CardOwnerName; } function setCardOwnerName($CardOwnerName, $charset = 'iso-8859-1') { $this->CardOwnerName = $CardOwnerName; $this->_elements['CardOwnerName']['charset'] = $charset; } function getBillingAddress() { return $this->BillingAddress; } function setBillingAddress($BillingAddress, $charset = 'iso-8859-1') { $this->BillingAddress = $BillingAddress; $this->_elements['BillingAddress']['charset'] = $charset; } function getCVV2() { return $this->CVV2; } function setCVV2($CVV2, $charset = 'iso-8859-1') { $this->CVV2 = $CVV2; $this->_elements['CVV2']['charset'] = $charset; } function getStartMonth() { return $this->StartMonth; } function setStartMonth($StartMonth, $charset = 'iso-8859-1') { $this->StartMonth = $StartMonth; $this->_elements['StartMonth']['charset'] = $charset; } function getStartYear() { return $this->StartYear; } function setStartYear($StartYear, $charset = 'iso-8859-1') { $this->StartYear = $StartYear; $this->_elements['StartYear']['charset'] = $charset; } function getIssueNumber() { return $this->IssueNumber; } function setIssueNumber($IssueNumber, $charset = 'iso-8859-1') { $this->IssueNumber = $IssueNumber; $this->_elements['IssueNumber']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/ReferenceCreditCardDetailsType.php
PHP
asf20
5,048
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * FMFDetailsType * * Thes are filters that could result in accept/deny/pending action. * * @package PayPal */ class FMFDetailsType extends XSDSimpleType { var $AcceptFilters; var $PendingFilters; var $DenyFilters; var $ReportFilters; function FMFDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'AcceptFilters' => array ( 'required' => false, 'type' => 'RiskFilterListType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PendingFilters' => array ( 'required' => false, 'type' => 'RiskFilterListType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'DenyFilters' => array ( 'required' => false, 'type' => 'RiskFilterListType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ReportFilters' => array ( 'required' => false, 'type' => 'RiskFilterListType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getAcceptFilters() { return $this->AcceptFilters; } function setAcceptFilters($AcceptFilters, $charset = 'iso-8859-1') { $this->AcceptFilters = $AcceptFilters; $this->_elements['AcceptFilters']['charset'] = $charset; } function getPendingFilters() { return $this->PendingFilters; } function setPendingFilters($PendingFilters, $charset = 'iso-8859-1') { $this->PendingFilters = $PendingFilters; $this->_elements['PendingFilters']['charset'] = $charset; } function getDenyFilters() { return $this->DenyFilters; } function setDenyFilters($DenyFilters, $charset = 'iso-8859-1') { $this->DenyFilters = $DenyFilters; $this->_elements['DenyFilters']['charset'] = $charset; } function getReportFilters() { return $this->ReportFilters; } function setReportFilters($ReportFilters, $charset = 'iso-8859-1') { $this->ReportFilters = $ReportFilters; $this->_elements['ReportFilters']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/FMFDetailsType.php
PHP
asf20
2,622
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * BillOutstandingAmountResponseDetailsType * * @package PayPal */ class BillOutstandingAmountResponseDetailsType extends XSDSimpleType { var $ProfileID; function BillOutstandingAmountResponseDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'ProfileID' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getProfileID() { return $this->ProfileID; } function setProfileID($ProfileID, $charset = 'iso-8859-1') { $this->ProfileID = $ProfileID; $this->_elements['ProfileID']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/BillOutstandingAmountResponseDetailsType.php
PHP
asf20
1,012
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * IncentiveApplyIndicationType * * Defines which bucket or item that the incentive should be applied to. * * @package PayPal */ class IncentiveApplyIndicationType extends XSDSimpleType { /** * The Bucket ID that the incentive is applied to. */ var $PaymentRequestID; /** * The item that the incentive is applied to. */ var $ItemId; function IncentiveApplyIndicationType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'PaymentRequestID' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ItemId' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getPaymentRequestID() { return $this->PaymentRequestID; } function setPaymentRequestID($PaymentRequestID, $charset = 'iso-8859-1') { $this->PaymentRequestID = $PaymentRequestID; $this->_elements['PaymentRequestID']['charset'] = $charset; } function getItemId() { return $this->ItemId; } function setItemId($ItemId, $charset = 'iso-8859-1') { $this->ItemId = $ItemId; $this->_elements['ItemId']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/IncentiveApplyIndicationType.php
PHP
asf20
1,704
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * GetBoardingDetailsRequestType * * @package PayPal */ class GetBoardingDetailsRequestType extends AbstractRequestType { /** * A unique token returned by the EnterBoarding API call that identifies this * boarding session. */ var $Token; function GetBoardingDetailsRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'Token' => array ( 'required' => true, 'type' => 'ExpressCheckoutTokenType', 'namespace' => 'urn:ebay:api:PayPalAPI', ), )); } function getToken() { return $this->Token; } function setToken($Token, $charset = 'iso-8859-1') { $this->Token = $Token; $this->_elements['Token']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/GetBoardingDetailsRequestType.php
PHP
asf20
1,084
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * UserIdPasswordType * * @package PayPal */ class UserIdPasswordType extends XSDSimpleType { var $AppId; var $DevId; var $AuthCert; /** * The username is the identifier for an account. */ var $Username; /** * Password contains the current password associated with the username. */ var $Password; /** * Signature for Three Token authentication. */ var $Signature; /** * This field identifies an account (e.g., payment) on whose behalf the operation * is being performed. For instance one account holder may delegate the abililty to * perform certain operations to another account holder. This delegation is done * through a separate mechanism. If the base username has not been authorized by * the subject the request will be rejected. */ var $Subject; /** * Authentication Session Token for authentication and authorization. */ var $AuthToken; function UserIdPasswordType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'AppId' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'DevId' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'AuthCert' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Username' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Password' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Signature' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Subject' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'AuthToken' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getAppId() { return $this->AppId; } function setAppId($AppId, $charset = 'iso-8859-1') { $this->AppId = $AppId; $this->_elements['AppId']['charset'] = $charset; } function getDevId() { return $this->DevId; } function setDevId($DevId, $charset = 'iso-8859-1') { $this->DevId = $DevId; $this->_elements['DevId']['charset'] = $charset; } function getAuthCert() { return $this->AuthCert; } function setAuthCert($AuthCert, $charset = 'iso-8859-1') { $this->AuthCert = $AuthCert; $this->_elements['AuthCert']['charset'] = $charset; } function getUsername() { return $this->Username; } function setUsername($Username, $charset = 'iso-8859-1') { $this->Username = $Username; $this->_elements['Username']['charset'] = $charset; } function getPassword() { return $this->Password; } function setPassword($Password, $charset = 'iso-8859-1') { $this->Password = $Password; $this->_elements['Password']['charset'] = $charset; } function getSignature() { return $this->Signature; } function setSignature($Signature, $charset = 'iso-8859-1') { $this->Signature = $Signature; $this->_elements['Signature']['charset'] = $charset; } function getSubject() { return $this->Subject; } function setSubject($Subject, $charset = 'iso-8859-1') { $this->Subject = $Subject; $this->_elements['Subject']['charset'] = $charset; } function getAuthToken() { return $this->AuthToken; } function setAuthToken($AuthToken, $charset = 'iso-8859-1') { $this->AuthToken = $AuthToken; $this->_elements['AuthToken']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/UserIdPasswordType.php
PHP
asf20
4,893
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * RiskFilterListType * * Details of Risk Filter. * * @package PayPal */ class RiskFilterListType extends XSDSimpleType { var $Filters; function RiskFilterListType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'Filters' => array ( 'required' => true, 'type' => 'RiskFilterDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getFilters() { return $this->Filters; } function setFilters($Filters, $charset = 'iso-8859-1') { $this->Filters = $Filters; $this->_elements['Filters']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/RiskFilterListType.php
PHP
asf20
974
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * FlightDetailsType * * Details of leg information * * @package PayPal */ class FlightDetailsType extends XSDSimpleType { var $ConjuctionTicket; var $ExchangeTicket; var $CouponNumber; var $ServiceClass; var $TravelDate; var $CarrierCode; var $StopOverPermitted; var $DepartureAirport; var $ArrivalAirport; var $FlightNumber; var $DepartureTime; var $ArrivalTime; var $FareBasisCode; var $Fare; var $Taxes; var $Fee; var $EndorsementOrRestrictions; function FlightDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'ConjuctionTicket' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ExchangeTicket' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'CouponNumber' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ServiceClass' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'TravelDate' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'CarrierCode' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'StopOverPermitted' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'DepartureAirport' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ArrivalAirport' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'FlightNumber' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'DepartureTime' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ArrivalTime' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'FareBasisCode' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Fare' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Taxes' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Fee' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'EndorsementOrRestrictions' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getConjuctionTicket() { return $this->ConjuctionTicket; } function setConjuctionTicket($ConjuctionTicket, $charset = 'iso-8859-1') { $this->ConjuctionTicket = $ConjuctionTicket; $this->_elements['ConjuctionTicket']['charset'] = $charset; } function getExchangeTicket() { return $this->ExchangeTicket; } function setExchangeTicket($ExchangeTicket, $charset = 'iso-8859-1') { $this->ExchangeTicket = $ExchangeTicket; $this->_elements['ExchangeTicket']['charset'] = $charset; } function getCouponNumber() { return $this->CouponNumber; } function setCouponNumber($CouponNumber, $charset = 'iso-8859-1') { $this->CouponNumber = $CouponNumber; $this->_elements['CouponNumber']['charset'] = $charset; } function getServiceClass() { return $this->ServiceClass; } function setServiceClass($ServiceClass, $charset = 'iso-8859-1') { $this->ServiceClass = $ServiceClass; $this->_elements['ServiceClass']['charset'] = $charset; } function getTravelDate() { return $this->TravelDate; } function setTravelDate($TravelDate, $charset = 'iso-8859-1') { $this->TravelDate = $TravelDate; $this->_elements['TravelDate']['charset'] = $charset; } function getCarrierCode() { return $this->CarrierCode; } function setCarrierCode($CarrierCode, $charset = 'iso-8859-1') { $this->CarrierCode = $CarrierCode; $this->_elements['CarrierCode']['charset'] = $charset; } function getStopOverPermitted() { return $this->StopOverPermitted; } function setStopOverPermitted($StopOverPermitted, $charset = 'iso-8859-1') { $this->StopOverPermitted = $StopOverPermitted; $this->_elements['StopOverPermitted']['charset'] = $charset; } function getDepartureAirport() { return $this->DepartureAirport; } function setDepartureAirport($DepartureAirport, $charset = 'iso-8859-1') { $this->DepartureAirport = $DepartureAirport; $this->_elements['DepartureAirport']['charset'] = $charset; } function getArrivalAirport() { return $this->ArrivalAirport; } function setArrivalAirport($ArrivalAirport, $charset = 'iso-8859-1') { $this->ArrivalAirport = $ArrivalAirport; $this->_elements['ArrivalAirport']['charset'] = $charset; } function getFlightNumber() { return $this->FlightNumber; } function setFlightNumber($FlightNumber, $charset = 'iso-8859-1') { $this->FlightNumber = $FlightNumber; $this->_elements['FlightNumber']['charset'] = $charset; } function getDepartureTime() { return $this->DepartureTime; } function setDepartureTime($DepartureTime, $charset = 'iso-8859-1') { $this->DepartureTime = $DepartureTime; $this->_elements['DepartureTime']['charset'] = $charset; } function getArrivalTime() { return $this->ArrivalTime; } function setArrivalTime($ArrivalTime, $charset = 'iso-8859-1') { $this->ArrivalTime = $ArrivalTime; $this->_elements['ArrivalTime']['charset'] = $charset; } function getFareBasisCode() { return $this->FareBasisCode; } function setFareBasisCode($FareBasisCode, $charset = 'iso-8859-1') { $this->FareBasisCode = $FareBasisCode; $this->_elements['FareBasisCode']['charset'] = $charset; } function getFare() { return $this->Fare; } function setFare($Fare, $charset = 'iso-8859-1') { $this->Fare = $Fare; $this->_elements['Fare']['charset'] = $charset; } function getTaxes() { return $this->Taxes; } function setTaxes($Taxes, $charset = 'iso-8859-1') { $this->Taxes = $Taxes; $this->_elements['Taxes']['charset'] = $charset; } function getFee() { return $this->Fee; } function setFee($Fee, $charset = 'iso-8859-1') { $this->Fee = $Fee; $this->_elements['Fee']['charset'] = $charset; } function getEndorsementOrRestrictions() { return $this->EndorsementOrRestrictions; } function setEndorsementOrRestrictions($EndorsementOrRestrictions, $charset = 'iso-8859-1') { $this->EndorsementOrRestrictions = $EndorsementOrRestrictions; $this->_elements['EndorsementOrRestrictions']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/FlightDetailsType.php
PHP
asf20
9,132
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * DoExpressCheckoutPaymentRequestType * * @package PayPal */ class DoExpressCheckoutPaymentRequestType extends AbstractRequestType { var $DoExpressCheckoutPaymentRequestDetails; /** * This flag indicates that the response should include FMFDetails */ var $ReturnFMFDetails; function DoExpressCheckoutPaymentRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'DoExpressCheckoutPaymentRequestDetails' => array ( 'required' => true, 'type' => 'DoExpressCheckoutPaymentRequestDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ReturnFMFDetails' => array ( 'required' => false, 'type' => 'int', 'namespace' => 'urn:ebay:api:PayPalAPI', ), )); } function getDoExpressCheckoutPaymentRequestDetails() { return $this->DoExpressCheckoutPaymentRequestDetails; } function setDoExpressCheckoutPaymentRequestDetails($DoExpressCheckoutPaymentRequestDetails, $charset = 'iso-8859-1') { $this->DoExpressCheckoutPaymentRequestDetails = $DoExpressCheckoutPaymentRequestDetails; $this->_elements['DoExpressCheckoutPaymentRequestDetails']['charset'] = $charset; } function getReturnFMFDetails() { return $this->ReturnFMFDetails; } function setReturnFMFDetails($ReturnFMFDetails, $charset = 'iso-8859-1') { $this->ReturnFMFDetails = $ReturnFMFDetails; $this->_elements['ReturnFMFDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/DoExpressCheckoutPaymentRequestType.php
PHP
asf20
1,918
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * InitiateRecoupRequestType * * @package PayPal */ class InitiateRecoupRequestType extends AbstractRequestType { var $EnhancedInitiateRecoupRequestDetails; function InitiateRecoupRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'EnhancedInitiateRecoupRequestDetails' => array ( 'required' => true, 'type' => 'EnhancedInitiateRecoupRequestDetailsType', 'namespace' => 'urn:ebay:apis:EnhancedDataTypes', ), )); } function getEnhancedInitiateRecoupRequestDetails() { return $this->EnhancedInitiateRecoupRequestDetails; } function setEnhancedInitiateRecoupRequestDetails($EnhancedInitiateRecoupRequestDetails, $charset = 'iso-8859-1') { $this->EnhancedInitiateRecoupRequestDetails = $EnhancedInitiateRecoupRequestDetails; $this->_elements['EnhancedInitiateRecoupRequestDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/InitiateRecoupRequestType.php
PHP
asf20
1,253
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * MerchantPullPaymentType * * MerchantPullPayment Parameters to make initiate a pull payment * * @package PayPal */ class MerchantPullPaymentType extends XSDSimpleType { /** * The amount to charge to the customer. */ var $Amount; /** * Preapproved Payments billing agreement identification number between the PayPal * customer and you. */ var $MpID; /** * Specifies type of PayPal payment you require */ var $PaymentType; /** * Text entered by the customer in the Note field during enrollment */ var $Memo; /** * Subject line of confirmation email sent to recipient */ var $EmailSubject; /** * The tax charged on the transaction */ var $Tax; /** * Per-transaction shipping charge */ var $Shipping; /** * Per-transaction handling charge */ var $Handling; /** * Name of purchased item */ var $ItemName; /** * Reference number of purchased item */ var $ItemNumber; /** * Your invoice number */ var $Invoice; /** * Custom annotation field for tracking or other use */ var $Custom; /** * An identification code for use by third-party applications to identify * transactions. */ var $ButtonSource; /** * Passed in soft descriptor string to be appended. */ var $SoftDescriptor; function MerchantPullPaymentType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'Amount' => array ( 'required' => true, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'MpID' => array ( 'required' => true, 'type' => 'MerchantPullIDType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentType' => array ( 'required' => false, 'type' => 'MerchantPullPaymentCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Memo' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'EmailSubject' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Tax' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Shipping' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Handling' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ItemName' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ItemNumber' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Invoice' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Custom' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ButtonSource' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SoftDescriptor' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getAmount() { return $this->Amount; } function setAmount($Amount, $charset = 'iso-8859-1') { $this->Amount = $Amount; $this->_elements['Amount']['charset'] = $charset; } function getMpID() { return $this->MpID; } function setMpID($MpID, $charset = 'iso-8859-1') { $this->MpID = $MpID; $this->_elements['MpID']['charset'] = $charset; } function getPaymentType() { return $this->PaymentType; } function setPaymentType($PaymentType, $charset = 'iso-8859-1') { $this->PaymentType = $PaymentType; $this->_elements['PaymentType']['charset'] = $charset; } function getMemo() { return $this->Memo; } function setMemo($Memo, $charset = 'iso-8859-1') { $this->Memo = $Memo; $this->_elements['Memo']['charset'] = $charset; } function getEmailSubject() { return $this->EmailSubject; } function setEmailSubject($EmailSubject, $charset = 'iso-8859-1') { $this->EmailSubject = $EmailSubject; $this->_elements['EmailSubject']['charset'] = $charset; } function getTax() { return $this->Tax; } function setTax($Tax, $charset = 'iso-8859-1') { $this->Tax = $Tax; $this->_elements['Tax']['charset'] = $charset; } function getShipping() { return $this->Shipping; } function setShipping($Shipping, $charset = 'iso-8859-1') { $this->Shipping = $Shipping; $this->_elements['Shipping']['charset'] = $charset; } function getHandling() { return $this->Handling; } function setHandling($Handling, $charset = 'iso-8859-1') { $this->Handling = $Handling; $this->_elements['Handling']['charset'] = $charset; } function getItemName() { return $this->ItemName; } function setItemName($ItemName, $charset = 'iso-8859-1') { $this->ItemName = $ItemName; $this->_elements['ItemName']['charset'] = $charset; } function getItemNumber() { return $this->ItemNumber; } function setItemNumber($ItemNumber, $charset = 'iso-8859-1') { $this->ItemNumber = $ItemNumber; $this->_elements['ItemNumber']['charset'] = $charset; } function getInvoice() { return $this->Invoice; } function setInvoice($Invoice, $charset = 'iso-8859-1') { $this->Invoice = $Invoice; $this->_elements['Invoice']['charset'] = $charset; } function getCustom() { return $this->Custom; } function setCustom($Custom, $charset = 'iso-8859-1') { $this->Custom = $Custom; $this->_elements['Custom']['charset'] = $charset; } function getButtonSource() { return $this->ButtonSource; } function setButtonSource($ButtonSource, $charset = 'iso-8859-1') { $this->ButtonSource = $ButtonSource; $this->_elements['ButtonSource']['charset'] = $charset; } function getSoftDescriptor() { return $this->SoftDescriptor; } function setSoftDescriptor($SoftDescriptor, $charset = 'iso-8859-1') { $this->SoftDescriptor = $SoftDescriptor; $this->_elements['SoftDescriptor']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/MerchantPullPaymentType.php
PHP
asf20
8,179
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * DoReferenceTransactionRequestDetailsType * * @package PayPal */ class DoReferenceTransactionRequestDetailsType extends XSDSimpleType { var $ReferenceID; var $PaymentAction; var $PaymentType; var $PaymentDetails; var $CreditCard; var $IPAddress; var $MerchantSessionId; var $ReqConfirmShipping; var $SoftDescriptor; function DoReferenceTransactionRequestDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'ReferenceID' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentAction' => array ( 'required' => true, 'type' => 'PaymentActionCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentType' => array ( 'required' => false, 'type' => 'MerchantPullPaymentCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentDetails' => array ( 'required' => true, 'type' => 'PaymentDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'CreditCard' => array ( 'required' => false, 'type' => 'ReferenceCreditCardDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'IPAddress' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'MerchantSessionId' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ReqConfirmShipping' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SoftDescriptor' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getReferenceID() { return $this->ReferenceID; } function setReferenceID($ReferenceID, $charset = 'iso-8859-1') { $this->ReferenceID = $ReferenceID; $this->_elements['ReferenceID']['charset'] = $charset; } function getPaymentAction() { return $this->PaymentAction; } function setPaymentAction($PaymentAction, $charset = 'iso-8859-1') { $this->PaymentAction = $PaymentAction; $this->_elements['PaymentAction']['charset'] = $charset; } function getPaymentType() { return $this->PaymentType; } function setPaymentType($PaymentType, $charset = 'iso-8859-1') { $this->PaymentType = $PaymentType; $this->_elements['PaymentType']['charset'] = $charset; } function getPaymentDetails() { return $this->PaymentDetails; } function setPaymentDetails($PaymentDetails, $charset = 'iso-8859-1') { $this->PaymentDetails = $PaymentDetails; $this->_elements['PaymentDetails']['charset'] = $charset; } function getCreditCard() { return $this->CreditCard; } function setCreditCard($CreditCard, $charset = 'iso-8859-1') { $this->CreditCard = $CreditCard; $this->_elements['CreditCard']['charset'] = $charset; } function getIPAddress() { return $this->IPAddress; } function setIPAddress($IPAddress, $charset = 'iso-8859-1') { $this->IPAddress = $IPAddress; $this->_elements['IPAddress']['charset'] = $charset; } function getMerchantSessionId() { return $this->MerchantSessionId; } function setMerchantSessionId($MerchantSessionId, $charset = 'iso-8859-1') { $this->MerchantSessionId = $MerchantSessionId; $this->_elements['MerchantSessionId']['charset'] = $charset; } function getReqConfirmShipping() { return $this->ReqConfirmShipping; } function setReqConfirmShipping($ReqConfirmShipping, $charset = 'iso-8859-1') { $this->ReqConfirmShipping = $ReqConfirmShipping; $this->_elements['ReqConfirmShipping']['charset'] = $charset; } function getSoftDescriptor() { return $this->SoftDescriptor; } function setSoftDescriptor($SoftDescriptor, $charset = 'iso-8859-1') { $this->SoftDescriptor = $SoftDescriptor; $this->_elements['SoftDescriptor']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/DoReferenceTransactionRequestDetailsType.php
PHP
asf20
5,222
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * CrossPromotionsType * * Merchandizing info for an Item. This contains a list of crosssell or upsell * items. PrimaryScheme, PromotionMethod,SellerId,ItemId, ShippingDiscount do not * have be min occur 0 * * @package PayPal */ class CrossPromotionsType extends XSDSimpleType { /** * Item ID for the base item. Based on this item other items are promoted. */ var $ItemID; var $PrimaryScheme; var $PromotionMethod; /** * Id of the Seller who is promoting this item. */ var $SellerID; /** * Shipping Discount offered or not by the seller. */ var $ShippingDiscount; /** * Key of the Seller who is promoting this item. */ var $SellerKey; /** * Store Name for the seller. */ var $StoreName; var $PromotedItem; function CrossPromotionsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'ItemID' => array ( 'required' => true, 'type' => 'ItemIDType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PrimaryScheme' => array ( 'required' => true, 'type' => 'PromotionSchemeCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PromotionMethod' => array ( 'required' => true, 'type' => 'PromotionMethodCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SellerID' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ShippingDiscount' => array ( 'required' => true, 'type' => 'boolean', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SellerKey' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'StoreName' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PromotedItem' => array ( 'required' => true, 'type' => 'PromotedItemType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getItemID() { return $this->ItemID; } function setItemID($ItemID, $charset = 'iso-8859-1') { $this->ItemID = $ItemID; $this->_elements['ItemID']['charset'] = $charset; } function getPrimaryScheme() { return $this->PrimaryScheme; } function setPrimaryScheme($PrimaryScheme, $charset = 'iso-8859-1') { $this->PrimaryScheme = $PrimaryScheme; $this->_elements['PrimaryScheme']['charset'] = $charset; } function getPromotionMethod() { return $this->PromotionMethod; } function setPromotionMethod($PromotionMethod, $charset = 'iso-8859-1') { $this->PromotionMethod = $PromotionMethod; $this->_elements['PromotionMethod']['charset'] = $charset; } function getSellerID() { return $this->SellerID; } function setSellerID($SellerID, $charset = 'iso-8859-1') { $this->SellerID = $SellerID; $this->_elements['SellerID']['charset'] = $charset; } function getShippingDiscount() { return $this->ShippingDiscount; } function setShippingDiscount($ShippingDiscount, $charset = 'iso-8859-1') { $this->ShippingDiscount = $ShippingDiscount; $this->_elements['ShippingDiscount']['charset'] = $charset; } function getSellerKey() { return $this->SellerKey; } function setSellerKey($SellerKey, $charset = 'iso-8859-1') { $this->SellerKey = $SellerKey; $this->_elements['SellerKey']['charset'] = $charset; } function getStoreName() { return $this->StoreName; } function setStoreName($StoreName, $charset = 'iso-8859-1') { $this->StoreName = $StoreName; $this->_elements['StoreName']['charset'] = $charset; } function getPromotedItem() { return $this->PromotedItem; } function setPromotedItem($PromotedItem, $charset = 'iso-8859-1') { $this->PromotedItem = $PromotedItem; $this->_elements['PromotedItem']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/CrossPromotionsType.php
PHP
asf20
5,017
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * DoNonReferencedCreditRequestType * * @package PayPal */ class DoNonReferencedCreditRequestType extends AbstractRequestType { var $DoNonReferencedCreditRequestDetails; function DoNonReferencedCreditRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'DoNonReferencedCreditRequestDetails' => array ( 'required' => true, 'type' => 'DoNonReferencedCreditRequestDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getDoNonReferencedCreditRequestDetails() { return $this->DoNonReferencedCreditRequestDetails; } function setDoNonReferencedCreditRequestDetails($DoNonReferencedCreditRequestDetails, $charset = 'iso-8859-1') { $this->DoNonReferencedCreditRequestDetails = $DoNonReferencedCreditRequestDetails; $this->_elements['DoNonReferencedCreditRequestDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/DoNonReferencedCreditRequestType.php
PHP
asf20
1,264
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * MerchantPullPaymentResponseType * * MerchantPullPaymentResponseType Response data from the merchant pull. * * @package PayPal */ class MerchantPullPaymentResponseType extends XSDSimpleType { /** * information about the customer */ var $PayerInfo; /** * Information about the transaction */ var $PaymentInfo; /** * Specific information about the preapproved payment */ var $MerchantPullInfo; function MerchantPullPaymentResponseType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'PayerInfo' => array ( 'required' => true, 'type' => 'PayerInfoType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentInfo' => array ( 'required' => true, 'type' => 'PaymentInfoType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'MerchantPullInfo' => array ( 'required' => true, 'type' => 'MerchantPullInfoType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getPayerInfo() { return $this->PayerInfo; } function setPayerInfo($PayerInfo, $charset = 'iso-8859-1') { $this->PayerInfo = $PayerInfo; $this->_elements['PayerInfo']['charset'] = $charset; } function getPaymentInfo() { return $this->PaymentInfo; } function setPaymentInfo($PaymentInfo, $charset = 'iso-8859-1') { $this->PaymentInfo = $PaymentInfo; $this->_elements['PaymentInfo']['charset'] = $charset; } function getMerchantPullInfo() { return $this->MerchantPullInfo; } function setMerchantPullInfo($MerchantPullInfo, $charset = 'iso-8859-1') { $this->MerchantPullInfo = $MerchantPullInfo; $this->_elements['MerchantPullInfo']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/MerchantPullPaymentResponseType.php
PHP
asf20
2,310
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * ListingDetailsType * * Contains the listed item details which consists of following information: . * * @package PayPal */ class ListingDetailsType extends XSDSimpleType { var $Adult; var $BindingAuction; var $CheckoutEnabled; /** * Converted value of the BuyItNowPrice in the currency indicated by SiteCurrency. * This value must be refreshed every 24 hours to pick up the current conversion * rates. */ var $ConvertedBuyItNowPrice; /** * Converted value of the StartPrice field in the currency indicated by * SiteCurrency. This value must be refreshed every 24 hours to pick up the current * conversion rates. */ var $ConvertedStartPrice; /** * Indicates the converted reserve price for a reserve auction. Returned only if * DetailLevel = 4. ReservePrice is only returned for auctions with a reserve price * where the user calling GetItem is the item's seller. Returned as null for * International Fixed Price items. For more information on reserve price auctions, * see http://pages.ebay.com/help/basics/f-format.html#1. */ var $ConvertedReservePrice; var $HasReservePrice; var $RegionName; /** * Indicates the new ItemID for a relisted item. When an item is relisted, the old * (expired) listing is annotated with the new (relist) ItemID. This field only * appears when the old listing is retrieved. */ var $RelistedItemID; /** * The ItemID for the original listing (i.e., OriginalItemID specific to Second * Chance Offer items). */ var $SecondChanceOriginalItemID; /** * Time stamp for the start of the listing (in GMT). For regular items, StartTime * is not sent in at listing time. */ var $StartTime; /** * Time stamp for the end of the listing (in GMT). */ var $EndTime; var $ViewItemURL; function ListingDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'Adult' => array ( 'required' => false, 'type' => 'boolean', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'BindingAuction' => array ( 'required' => false, 'type' => 'boolean', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'CheckoutEnabled' => array ( 'required' => false, 'type' => 'boolean', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ConvertedBuyItNowPrice' => array ( 'required' => false, 'type' => 'AmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ConvertedStartPrice' => array ( 'required' => false, 'type' => 'AmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ConvertedReservePrice' => array ( 'required' => false, 'type' => 'AmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'HasReservePrice' => array ( 'required' => false, 'type' => 'boolean', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'RegionName' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'RelistedItemID' => array ( 'required' => false, 'type' => 'ItemIDType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SecondChanceOriginalItemID' => array ( 'required' => false, 'type' => 'ItemIDType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'StartTime' => array ( 'required' => false, 'type' => 'dateTime', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'EndTime' => array ( 'required' => false, 'type' => 'dateTime', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ViewItemURL' => array ( 'required' => false, 'type' => 'anyURI', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getAdult() { return $this->Adult; } function setAdult($Adult, $charset = 'iso-8859-1') { $this->Adult = $Adult; $this->_elements['Adult']['charset'] = $charset; } function getBindingAuction() { return $this->BindingAuction; } function setBindingAuction($BindingAuction, $charset = 'iso-8859-1') { $this->BindingAuction = $BindingAuction; $this->_elements['BindingAuction']['charset'] = $charset; } function getCheckoutEnabled() { return $this->CheckoutEnabled; } function setCheckoutEnabled($CheckoutEnabled, $charset = 'iso-8859-1') { $this->CheckoutEnabled = $CheckoutEnabled; $this->_elements['CheckoutEnabled']['charset'] = $charset; } function getConvertedBuyItNowPrice() { return $this->ConvertedBuyItNowPrice; } function setConvertedBuyItNowPrice($ConvertedBuyItNowPrice, $charset = 'iso-8859-1') { $this->ConvertedBuyItNowPrice = $ConvertedBuyItNowPrice; $this->_elements['ConvertedBuyItNowPrice']['charset'] = $charset; } function getConvertedStartPrice() { return $this->ConvertedStartPrice; } function setConvertedStartPrice($ConvertedStartPrice, $charset = 'iso-8859-1') { $this->ConvertedStartPrice = $ConvertedStartPrice; $this->_elements['ConvertedStartPrice']['charset'] = $charset; } function getConvertedReservePrice() { return $this->ConvertedReservePrice; } function setConvertedReservePrice($ConvertedReservePrice, $charset = 'iso-8859-1') { $this->ConvertedReservePrice = $ConvertedReservePrice; $this->_elements['ConvertedReservePrice']['charset'] = $charset; } function getHasReservePrice() { return $this->HasReservePrice; } function setHasReservePrice($HasReservePrice, $charset = 'iso-8859-1') { $this->HasReservePrice = $HasReservePrice; $this->_elements['HasReservePrice']['charset'] = $charset; } function getRegionName() { return $this->RegionName; } function setRegionName($RegionName, $charset = 'iso-8859-1') { $this->RegionName = $RegionName; $this->_elements['RegionName']['charset'] = $charset; } function getRelistedItemID() { return $this->RelistedItemID; } function setRelistedItemID($RelistedItemID, $charset = 'iso-8859-1') { $this->RelistedItemID = $RelistedItemID; $this->_elements['RelistedItemID']['charset'] = $charset; } function getSecondChanceOriginalItemID() { return $this->SecondChanceOriginalItemID; } function setSecondChanceOriginalItemID($SecondChanceOriginalItemID, $charset = 'iso-8859-1') { $this->SecondChanceOriginalItemID = $SecondChanceOriginalItemID; $this->_elements['SecondChanceOriginalItemID']['charset'] = $charset; } function getStartTime() { return $this->StartTime; } function setStartTime($StartTime, $charset = 'iso-8859-1') { $this->StartTime = $StartTime; $this->_elements['StartTime']['charset'] = $charset; } function getEndTime() { return $this->EndTime; } function setEndTime($EndTime, $charset = 'iso-8859-1') { $this->EndTime = $EndTime; $this->_elements['EndTime']['charset'] = $charset; } function getViewItemURL() { return $this->ViewItemURL; } function setViewItemURL($ViewItemURL, $charset = 'iso-8859-1') { $this->ViewItemURL = $ViewItemURL; $this->_elements['ViewItemURL']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/ListingDetailsType.php
PHP
asf20
8,825
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * ItemArrayType * * @package PayPal */ class ItemArrayType extends XSDSimpleType { var $Item; function ItemArrayType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'Item' => array ( 'required' => false, 'type' => NULL, 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getItem() { return $this->Item; } function setItem($Item, $charset = 'iso-8859-1') { $this->Item = $Item; $this->_elements['Item']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/ItemArrayType.php
PHP
asf20
883
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * ReverseTransactionRequestType * * @package PayPal */ class ReverseTransactionRequestType extends AbstractRequestType { var $ReverseTransactionRequestDetails; function ReverseTransactionRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'ReverseTransactionRequestDetails' => array ( 'required' => true, 'type' => 'ReverseTransactionRequestDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getReverseTransactionRequestDetails() { return $this->ReverseTransactionRequestDetails; } function setReverseTransactionRequestDetails($ReverseTransactionRequestDetails, $charset = 'iso-8859-1') { $this->ReverseTransactionRequestDetails = $ReverseTransactionRequestDetails; $this->_elements['ReverseTransactionRequestDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/ReverseTransactionRequestType.php
PHP
asf20
1,225
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractResponseType.php'; /** * UpdateRecurringPaymentsProfileResponseType * * @package PayPal */ class UpdateRecurringPaymentsProfileResponseType extends AbstractResponseType { var $UpdateRecurringPaymentsProfileResponseDetails; function UpdateRecurringPaymentsProfileResponseType() { parent::AbstractResponseType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'UpdateRecurringPaymentsProfileResponseDetails' => array ( 'required' => true, 'type' => 'UpdateRecurringPaymentsProfileResponseDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getUpdateRecurringPaymentsProfileResponseDetails() { return $this->UpdateRecurringPaymentsProfileResponseDetails; } function setUpdateRecurringPaymentsProfileResponseDetails($UpdateRecurringPaymentsProfileResponseDetails, $charset = 'iso-8859-1') { $this->UpdateRecurringPaymentsProfileResponseDetails = $UpdateRecurringPaymentsProfileResponseDetails; $this->_elements['UpdateRecurringPaymentsProfileResponseDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/UpdateRecurringPaymentsProfileResponseType.php
PHP
asf20
1,397
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * BAUpdateResponseDetailsType * * @package PayPal */ class BAUpdateResponseDetailsType extends XSDSimpleType { var $BillingAgreementID; var $BillingAgreementDescription; var $BillingAgreementStatus; var $BillingAgreementCustom; var $PayerInfo; var $BillingAgreementMax; /** * Customer's billing address. */ var $BillingAddress; function BAUpdateResponseDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'BillingAgreementID' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'BillingAgreementDescription' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'BillingAgreementStatus' => array ( 'required' => true, 'type' => 'MerchantPullStatusCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'BillingAgreementCustom' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PayerInfo' => array ( 'required' => true, 'type' => 'PayerInfoType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'BillingAgreementMax' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'BillingAddress' => array ( 'required' => false, 'type' => 'AddressType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getBillingAgreementID() { return $this->BillingAgreementID; } function setBillingAgreementID($BillingAgreementID, $charset = 'iso-8859-1') { $this->BillingAgreementID = $BillingAgreementID; $this->_elements['BillingAgreementID']['charset'] = $charset; } function getBillingAgreementDescription() { return $this->BillingAgreementDescription; } function setBillingAgreementDescription($BillingAgreementDescription, $charset = 'iso-8859-1') { $this->BillingAgreementDescription = $BillingAgreementDescription; $this->_elements['BillingAgreementDescription']['charset'] = $charset; } function getBillingAgreementStatus() { return $this->BillingAgreementStatus; } function setBillingAgreementStatus($BillingAgreementStatus, $charset = 'iso-8859-1') { $this->BillingAgreementStatus = $BillingAgreementStatus; $this->_elements['BillingAgreementStatus']['charset'] = $charset; } function getBillingAgreementCustom() { return $this->BillingAgreementCustom; } function setBillingAgreementCustom($BillingAgreementCustom, $charset = 'iso-8859-1') { $this->BillingAgreementCustom = $BillingAgreementCustom; $this->_elements['BillingAgreementCustom']['charset'] = $charset; } function getPayerInfo() { return $this->PayerInfo; } function setPayerInfo($PayerInfo, $charset = 'iso-8859-1') { $this->PayerInfo = $PayerInfo; $this->_elements['PayerInfo']['charset'] = $charset; } function getBillingAgreementMax() { return $this->BillingAgreementMax; } function setBillingAgreementMax($BillingAgreementMax, $charset = 'iso-8859-1') { $this->BillingAgreementMax = $BillingAgreementMax; $this->_elements['BillingAgreementMax']['charset'] = $charset; } function getBillingAddress() { return $this->BillingAddress; } function setBillingAddress($BillingAddress, $charset = 'iso-8859-1') { $this->BillingAddress = $BillingAddress; $this->_elements['BillingAddress']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/BAUpdateResponseDetailsType.php
PHP
asf20
4,537
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * PromotedItemType * * Merchandizing info for an Item. This contains a list of crosssell or upsell * items. * * @package PayPal */ class PromotedItemType extends XSDSimpleType { /** * Item ID for the base item. Based on this item other items are promoted. it is * teh only tag that would show up in all calls that use promoted item type. some * are not in soap yet, such as get and ser promotion rules */ var $ItemID; /** * URL for the picture of the promoted item. */ var $PictureURL; /** * Where to display in the list of items.currentl y even forget and set does not * have to be minoccur =0 but if we ever were to do revise promotion tems, it can * be omitted */ var $position; /** * Promotion Price. Price at which the buyer can buy the item now. */ var $PromotionPrice; var $PromotionPriceType; var $SelectionType; /** * Item Title for the promoted item. */ var $Title; var $ListingType; function PromotedItemType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'ItemID' => array ( 'required' => true, 'type' => 'ItemIDType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PictureURL' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'position' => array ( 'required' => false, 'type' => 'int', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PromotionPrice' => array ( 'required' => false, 'type' => 'AmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PromotionPriceType' => array ( 'required' => false, 'type' => 'PromotionItemPriceTypeCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SelectionType' => array ( 'required' => false, 'type' => 'PromotionItemSelectionCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Title' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ListingType' => array ( 'required' => false, 'type' => 'ListingTypeCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getItemID() { return $this->ItemID; } function setItemID($ItemID, $charset = 'iso-8859-1') { $this->ItemID = $ItemID; $this->_elements['ItemID']['charset'] = $charset; } function getPictureURL() { return $this->PictureURL; } function setPictureURL($PictureURL, $charset = 'iso-8859-1') { $this->PictureURL = $PictureURL; $this->_elements['PictureURL']['charset'] = $charset; } function getposition() { return $this->position; } function setposition($position, $charset = 'iso-8859-1') { $this->position = $position; $this->_elements['position']['charset'] = $charset; } function getPromotionPrice() { return $this->PromotionPrice; } function setPromotionPrice($PromotionPrice, $charset = 'iso-8859-1') { $this->PromotionPrice = $PromotionPrice; $this->_elements['PromotionPrice']['charset'] = $charset; } function getPromotionPriceType() { return $this->PromotionPriceType; } function setPromotionPriceType($PromotionPriceType, $charset = 'iso-8859-1') { $this->PromotionPriceType = $PromotionPriceType; $this->_elements['PromotionPriceType']['charset'] = $charset; } function getSelectionType() { return $this->SelectionType; } function setSelectionType($SelectionType, $charset = 'iso-8859-1') { $this->SelectionType = $SelectionType; $this->_elements['SelectionType']['charset'] = $charset; } function getTitle() { return $this->Title; } function setTitle($Title, $charset = 'iso-8859-1') { $this->Title = $Title; $this->_elements['Title']['charset'] = $charset; } function getListingType() { return $this->ListingType; } function setListingType($ListingType, $charset = 'iso-8859-1') { $this->ListingType = $ListingType; $this->_elements['ListingType']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/PromotedItemType.php
PHP
asf20
5,220
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * GetMobileStatusRequestDetailsType * * @package PayPal */ class GetMobileStatusRequestDetailsType extends XSDSimpleType { /** * Phone number for status inquiry */ var $Phone; function GetMobileStatusRequestDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'Phone' => array ( 'required' => true, 'type' => 'PhoneNumberType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getPhone() { return $this->Phone; } function setPhone($Phone, $charset = 'iso-8859-1') { $this->Phone = $Phone; $this->_elements['Phone']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/GetMobileStatusRequestDetailsType.php
PHP
asf20
1,019
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * SetExpressCheckoutRequestType * * @package PayPal */ class SetExpressCheckoutRequestType extends AbstractRequestType { var $SetExpressCheckoutRequestDetails; function SetExpressCheckoutRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'SetExpressCheckoutRequestDetails' => array ( 'required' => true, 'type' => 'SetExpressCheckoutRequestDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getSetExpressCheckoutRequestDetails() { return $this->SetExpressCheckoutRequestDetails; } function setSetExpressCheckoutRequestDetails($SetExpressCheckoutRequestDetails, $charset = 'iso-8859-1') { $this->SetExpressCheckoutRequestDetails = $SetExpressCheckoutRequestDetails; $this->_elements['SetExpressCheckoutRequestDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/SetExpressCheckoutRequestType.php
PHP
asf20
1,225
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractResponseType.php'; /** * BillOutstandingAmountResponseType * * @package PayPal */ class BillOutstandingAmountResponseType extends AbstractResponseType { var $BillOutstandingAmountResponseDetails; function BillOutstandingAmountResponseType() { parent::AbstractResponseType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'BillOutstandingAmountResponseDetails' => array ( 'required' => true, 'type' => 'BillOutstandingAmountResponseDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getBillOutstandingAmountResponseDetails() { return $this->BillOutstandingAmountResponseDetails; } function setBillOutstandingAmountResponseDetails($BillOutstandingAmountResponseDetails, $charset = 'iso-8859-1') { $this->BillOutstandingAmountResponseDetails = $BillOutstandingAmountResponseDetails; $this->_elements['BillOutstandingAmountResponseDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/BillOutstandingAmountResponseType.php
PHP
asf20
1,280
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractResponseType.php'; /** * GetMobileStatusResponseType * * @package PayPal */ class GetMobileStatusResponseType extends AbstractResponseType { /** * Indicates whether the phone is activated for mobile payments */ var $IsActivated; /** * Indicates whether there is a payment pending from the phone */ var $PaymentPending; function GetMobileStatusResponseType() { parent::AbstractResponseType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'IsActivated' => array ( 'required' => true, 'type' => 'integer', 'namespace' => 'urn:ebay:api:PayPalAPI', ), 'PaymentPending' => array ( 'required' => true, 'type' => 'integer', 'namespace' => 'urn:ebay:api:PayPalAPI', ), )); } function getIsActivated() { return $this->IsActivated; } function setIsActivated($IsActivated, $charset = 'iso-8859-1') { $this->IsActivated = $IsActivated; $this->_elements['IsActivated']['charset'] = $charset; } function getPaymentPending() { return $this->PaymentPending; } function setPaymentPending($PaymentPending, $charset = 'iso-8859-1') { $this->PaymentPending = $PaymentPending; $this->_elements['PaymentPending']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/GetMobileStatusResponseType.php
PHP
asf20
1,675
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * AbstractResponseType * * Base type definition of a response payload that can carry any type of payload * content with following optional elements: - timestamp of response message, - * application level acknowledgement, and - application-level errors and warnings. * * @package PayPal */ class AbstractResponseType extends XSDSimpleType { /** * This value represents the date and time (GMT) when the response was generated by * a service provider (as a result of processing of a request). */ var $Timestamp; /** * Application level acknowledgement code. */ var $Ack; /** * CorrelationID may be used optionally with an application level acknowledgement. */ var $CorrelationID; var $Errors; /** * This refers to the version of the response payload schema. */ var $Version; /** * This refers to the specific software build that was used in the deployment for * processing the request and generating the response. */ var $Build; function AbstractResponseType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'Timestamp' => array ( 'required' => false, 'type' => 'dateTime', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Ack' => array ( 'required' => true, 'type' => 'AckCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'CorrelationID' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Errors' => array ( 'required' => false, 'type' => 'ErrorType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Version' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Build' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getTimestamp() { return $this->Timestamp; } function setTimestamp($Timestamp, $charset = 'iso-8859-1') { $this->Timestamp = $Timestamp; $this->_elements['Timestamp']['charset'] = $charset; } function getAck() { return $this->Ack; } function setAck($Ack, $charset = 'iso-8859-1') { $this->Ack = $Ack; $this->_elements['Ack']['charset'] = $charset; } function getCorrelationID() { return $this->CorrelationID; } function setCorrelationID($CorrelationID, $charset = 'iso-8859-1') { $this->CorrelationID = $CorrelationID; $this->_elements['CorrelationID']['charset'] = $charset; } function getErrors() { return $this->Errors; } function setErrors($Errors, $charset = 'iso-8859-1') { $this->Errors = $Errors; $this->_elements['Errors']['charset'] = $charset; } function getVersion() { return $this->Version; } function setVersion($Version, $charset = 'iso-8859-1') { $this->Version = $Version; $this->_elements['Version']['charset'] = $charset; } function getBuild() { return $this->Build; } function setBuild($Build, $charset = 'iso-8859-1') { $this->Build = $Build; $this->_elements['Build']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/AbstractResponseType.php
PHP
asf20
4,075
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * GetIncentiveEvaluationResponseDetailsType * * @package PayPal */ class GetIncentiveEvaluationResponseDetailsType extends XSDSimpleType { var $IncentiveDetails; var $RequestId; function GetIncentiveEvaluationResponseDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'IncentiveDetails' => array ( 'required' => false, 'type' => 'IncentiveDetailType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'RequestId' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getIncentiveDetails() { return $this->IncentiveDetails; } function setIncentiveDetails($IncentiveDetails, $charset = 'iso-8859-1') { $this->IncentiveDetails = $IncentiveDetails; $this->_elements['IncentiveDetails']['charset'] = $charset; } function getRequestId() { return $this->RequestId; } function setRequestId($RequestId, $charset = 'iso-8859-1') { $this->RequestId = $RequestId; $this->_elements['RequestId']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/GetIncentiveEvaluationResponseDetailsType.php
PHP
asf20
1,569
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * ListOfAttributeSetType * * @package PayPal */ class ListOfAttributeSetType extends XSDSimpleType { var $AttributeSet; function ListOfAttributeSetType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'AttributeSet' => array ( 'required' => true, 'type' => 'AttributeSetType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getAttributeSet() { return $this->AttributeSet; } function setAttributeSet($AttributeSet, $charset = 'iso-8859-1') { $this->AttributeSet = $AttributeSet; $this->_elements['AttributeSet']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/ListOfAttributeSetType.php
PHP
asf20
995
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * SellingStatusType * * Contains the listed items price details which consists of following information: * BuyItNowPrice, ConvertedBuyItNowPrice, ConvertedPrice, ConvertedStartPrice, * CurrentPrice, MinimumToBid, ReservePrice, and StartPrice. need to take in * account get seller events when defining minoccurs = 0 * * @package PayPal */ class SellingStatusType extends XSDSimpleType { /** * Number of bids placed so far against the item. Not returned for International * Fixed Price items. */ var $BidCount; /** * Smallest amount a bid must be above the current high bid. Not returned * International Fixed Price items. */ var $BidIncrement; /** * Converted current price of listed item. */ var $ConvertedCurrentPrice; /** * For auction-format listings, current minimum asking price or the current highest * bid for the item if bids have been placed. Shows minimum bid if no bids have * been placed against the item. This field does not reflect the actual current * price of the item if it's a Type=7 or Type=9 (Fixed Price) item and the price * has been revised. (See StartPrice for revised asking price.) */ var $CurrentPrice; /** * Contains one User node representing the current high bidder. GetItem returns a * high bidder for auctions that have ended and have a winning bidder. For Fixed * Price listings, in-progress auctions, or auction items that received no bids, * GetItem returns a HighBidder node with empty tags. */ var $HighBidder; /** * Applicable to ad-format items only. Indicates how many leads to potential buyers * are associated with this item. For other item types (other than ad-format * items), returns a value of 0 (zero). */ var $LeadCount; /** * Minimum acceptable bid for the item. Not returned for International Fixed Price * items. */ var $MinimumToBid; /** * Number of items purchased so far. (Subtract from the value returned in the * Quantity field to calculate the number of items remaining.) */ var $QuantitySold; /** * Returns true if the reserve price was met or no reserve price was specified. */ var $ReserveMet; var $SecondChanceEligible; function SellingStatusType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'BidCount' => array ( 'required' => false, 'type' => 'int', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'BidIncrement' => array ( 'required' => false, 'type' => 'AmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ConvertedCurrentPrice' => array ( 'required' => false, 'type' => 'AmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'CurrentPrice' => array ( 'required' => true, 'type' => 'AmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'HighBidder' => array ( 'required' => false, 'type' => NULL, 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'LeadCount' => array ( 'required' => false, 'type' => 'int', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'MinimumToBid' => array ( 'required' => false, 'type' => 'AmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'QuantitySold' => array ( 'required' => true, 'type' => 'int', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ReserveMet' => array ( 'required' => false, 'type' => 'boolean', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SecondChanceEligible' => array ( 'required' => false, 'type' => 'boolean', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getBidCount() { return $this->BidCount; } function setBidCount($BidCount, $charset = 'iso-8859-1') { $this->BidCount = $BidCount; $this->_elements['BidCount']['charset'] = $charset; } function getBidIncrement() { return $this->BidIncrement; } function setBidIncrement($BidIncrement, $charset = 'iso-8859-1') { $this->BidIncrement = $BidIncrement; $this->_elements['BidIncrement']['charset'] = $charset; } function getConvertedCurrentPrice() { return $this->ConvertedCurrentPrice; } function setConvertedCurrentPrice($ConvertedCurrentPrice, $charset = 'iso-8859-1') { $this->ConvertedCurrentPrice = $ConvertedCurrentPrice; $this->_elements['ConvertedCurrentPrice']['charset'] = $charset; } function getCurrentPrice() { return $this->CurrentPrice; } function setCurrentPrice($CurrentPrice, $charset = 'iso-8859-1') { $this->CurrentPrice = $CurrentPrice; $this->_elements['CurrentPrice']['charset'] = $charset; } function getHighBidder() { return $this->HighBidder; } function setHighBidder($HighBidder, $charset = 'iso-8859-1') { $this->HighBidder = $HighBidder; $this->_elements['HighBidder']['charset'] = $charset; } function getLeadCount() { return $this->LeadCount; } function setLeadCount($LeadCount, $charset = 'iso-8859-1') { $this->LeadCount = $LeadCount; $this->_elements['LeadCount']['charset'] = $charset; } function getMinimumToBid() { return $this->MinimumToBid; } function setMinimumToBid($MinimumToBid, $charset = 'iso-8859-1') { $this->MinimumToBid = $MinimumToBid; $this->_elements['MinimumToBid']['charset'] = $charset; } function getQuantitySold() { return $this->QuantitySold; } function setQuantitySold($QuantitySold, $charset = 'iso-8859-1') { $this->QuantitySold = $QuantitySold; $this->_elements['QuantitySold']['charset'] = $charset; } function getReserveMet() { return $this->ReserveMet; } function setReserveMet($ReserveMet, $charset = 'iso-8859-1') { $this->ReserveMet = $ReserveMet; $this->_elements['ReserveMet']['charset'] = $charset; } function getSecondChanceEligible() { return $this->SecondChanceEligible; } function setSecondChanceEligible($SecondChanceEligible, $charset = 'iso-8859-1') { $this->SecondChanceEligible = $SecondChanceEligible; $this->_elements['SecondChanceEligible']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/SellingStatusType.php
PHP
asf20
7,555
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * TransactionsType * * Contains information about multiple individual transations. * * @package PayPal */ class TransactionsType extends XSDSimpleType { var $Transaction; function TransactionsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'Transaction' => array ( 'required' => true, 'type' => NULL, 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getTransaction() { return $this->Transaction; } function setTransaction($Transaction, $charset = 'iso-8859-1') { $this->Transaction = $Transaction; $this->_elements['Transaction']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/TransactionsType.php
PHP
asf20
1,021
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * GetTransactionDetailsRequestType * * @package PayPal */ class GetTransactionDetailsRequestType extends AbstractRequestType { /** * Unique identifier of a transaction. */ var $TransactionID; function GetTransactionDetailsRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'TransactionID' => array ( 'required' => true, 'type' => 'TransactionId', 'namespace' => 'urn:ebay:api:PayPalAPI', ), )); } function getTransactionID() { return $this->TransactionID; } function setTransactionID($TransactionID, $charset = 'iso-8859-1') { $this->TransactionID = $TransactionID; $this->_elements['TransactionID']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/GetTransactionDetailsRequestType.php
PHP
asf20
1,090
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * DoMobileCheckoutPaymentResponseDetailsType * * @package PayPal */ class DoMobileCheckoutPaymentResponseDetailsType extends XSDSimpleType { /** * A free-form field for your own use, such as a tracking number or other value you * want returned to you in IPN. */ var $Custom; /** * Your own unique invoice or tracking number. */ var $InvoiceID; /** * Information about the payer */ var $PayerInfo; /** * Information about the transaction */ var $PaymentInfo; function DoMobileCheckoutPaymentResponseDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'Custom' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'InvoiceID' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PayerInfo' => array ( 'required' => true, 'type' => 'PayerInfoType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentInfo' => array ( 'required' => true, 'type' => 'PaymentInfoType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getCustom() { return $this->Custom; } function setCustom($Custom, $charset = 'iso-8859-1') { $this->Custom = $Custom; $this->_elements['Custom']['charset'] = $charset; } function getInvoiceID() { return $this->InvoiceID; } function setInvoiceID($InvoiceID, $charset = 'iso-8859-1') { $this->InvoiceID = $InvoiceID; $this->_elements['InvoiceID']['charset'] = $charset; } function getPayerInfo() { return $this->PayerInfo; } function setPayerInfo($PayerInfo, $charset = 'iso-8859-1') { $this->PayerInfo = $PayerInfo; $this->_elements['PayerInfo']['charset'] = $charset; } function getPaymentInfo() { return $this->PaymentInfo; } function setPaymentInfo($PaymentInfo, $charset = 'iso-8859-1') { $this->PaymentInfo = $PaymentInfo; $this->_elements['PaymentInfo']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/DoMobileCheckoutPaymentResponseDetailsType.php
PHP
asf20
2,770
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractResponseType.php'; /** * BillUserResponseType * * @package PayPal */ class BillUserResponseType extends AbstractResponseType { var $BillUserResponseDetails; var $FMFDetails; function BillUserResponseType() { parent::AbstractResponseType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'BillUserResponseDetails' => array ( 'required' => true, 'type' => 'MerchantPullPaymentResponseType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'FMFDetails' => array ( 'required' => false, 'type' => 'FMFDetailsType', 'namespace' => 'urn:ebay:api:PayPalAPI', ), )); } function getBillUserResponseDetails() { return $this->BillUserResponseDetails; } function setBillUserResponseDetails($BillUserResponseDetails, $charset = 'iso-8859-1') { $this->BillUserResponseDetails = $BillUserResponseDetails; $this->_elements['BillUserResponseDetails']['charset'] = $charset; } function getFMFDetails() { return $this->FMFDetails; } function setFMFDetails($FMFDetails, $charset = 'iso-8859-1') { $this->FMFDetails = $FMFDetails; $this->_elements['FMFDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/BillUserResponseType.php
PHP
asf20
1,600
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * BAUpdateRequestType * * @package PayPal */ class BAUpdateRequestType extends AbstractRequestType { var $ReferenceID; var $BillingAgreementDescription; var $BillingAgreementStatus; var $BillingAgreementCustom; function BAUpdateRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'ReferenceID' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), 'BillingAgreementDescription' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), 'BillingAgreementStatus' => array ( 'required' => false, 'type' => 'MerchantPullStatusCodeType', 'namespace' => 'urn:ebay:api:PayPalAPI', ), 'BillingAgreementCustom' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), )); } function getReferenceID() { return $this->ReferenceID; } function setReferenceID($ReferenceID, $charset = 'iso-8859-1') { $this->ReferenceID = $ReferenceID; $this->_elements['ReferenceID']['charset'] = $charset; } function getBillingAgreementDescription() { return $this->BillingAgreementDescription; } function setBillingAgreementDescription($BillingAgreementDescription, $charset = 'iso-8859-1') { $this->BillingAgreementDescription = $BillingAgreementDescription; $this->_elements['BillingAgreementDescription']['charset'] = $charset; } function getBillingAgreementStatus() { return $this->BillingAgreementStatus; } function setBillingAgreementStatus($BillingAgreementStatus, $charset = 'iso-8859-1') { $this->BillingAgreementStatus = $BillingAgreementStatus; $this->_elements['BillingAgreementStatus']['charset'] = $charset; } function getBillingAgreementCustom() { return $this->BillingAgreementCustom; } function setBillingAgreementCustom($BillingAgreementCustom, $charset = 'iso-8859-1') { $this->BillingAgreementCustom = $BillingAgreementCustom; $this->_elements['BillingAgreementCustom']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/BAUpdateRequestType.php
PHP
asf20
2,787
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractResponseType.php'; /** * DoNonReferencedCreditResponseType * * @package PayPal */ class DoNonReferencedCreditResponseType extends AbstractResponseType { var $DoNonReferencedCreditResponseDetails; function DoNonReferencedCreditResponseType() { parent::AbstractResponseType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'DoNonReferencedCreditResponseDetails' => array ( 'required' => true, 'type' => 'DoNonReferencedCreditResponseDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getDoNonReferencedCreditResponseDetails() { return $this->DoNonReferencedCreditResponseDetails; } function setDoNonReferencedCreditResponseDetails($DoNonReferencedCreditResponseDetails, $charset = 'iso-8859-1') { $this->DoNonReferencedCreditResponseDetails = $DoNonReferencedCreditResponseDetails; $this->_elements['DoNonReferencedCreditResponseDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/DoNonReferencedCreditResponseType.php
PHP
asf20
1,280
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * OptionTrackingDetailsType * * @package PayPal */ class OptionTrackingDetailsType extends XSDSimpleType { /** * Option Number. */ var $OptionNumber; /** * Option Quantity. */ var $OptionQty; /** * Option Select Name. */ var $OptionSelect; /** * Option Quantity Delta. */ var $OptionQtyDelta; /** * Option Alert. */ var $OptionAlert; /** * Option Cost. */ var $OptionCost; function OptionTrackingDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'OptionNumber' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'OptionQty' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'OptionSelect' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'OptionQtyDelta' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'OptionAlert' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'OptionCost' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getOptionNumber() { return $this->OptionNumber; } function setOptionNumber($OptionNumber, $charset = 'iso-8859-1') { $this->OptionNumber = $OptionNumber; $this->_elements['OptionNumber']['charset'] = $charset; } function getOptionQty() { return $this->OptionQty; } function setOptionQty($OptionQty, $charset = 'iso-8859-1') { $this->OptionQty = $OptionQty; $this->_elements['OptionQty']['charset'] = $charset; } function getOptionSelect() { return $this->OptionSelect; } function setOptionSelect($OptionSelect, $charset = 'iso-8859-1') { $this->OptionSelect = $OptionSelect; $this->_elements['OptionSelect']['charset'] = $charset; } function getOptionQtyDelta() { return $this->OptionQtyDelta; } function setOptionQtyDelta($OptionQtyDelta, $charset = 'iso-8859-1') { $this->OptionQtyDelta = $OptionQtyDelta; $this->_elements['OptionQtyDelta']['charset'] = $charset; } function getOptionAlert() { return $this->OptionAlert; } function setOptionAlert($OptionAlert, $charset = 'iso-8859-1') { $this->OptionAlert = $OptionAlert; $this->_elements['OptionAlert']['charset'] = $charset; } function getOptionCost() { return $this->OptionCost; } function setOptionCost($OptionCost, $charset = 'iso-8859-1') { $this->OptionCost = $OptionCost; $this->_elements['OptionCost']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/optiontrackingdetailstype.php
PHP
asf20
3,719
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractResponseType.php'; /** * GetAuthDetailsResponseType * * @package PayPal */ class GetAuthDetailsResponseType extends AbstractResponseType { var $GetAuthDetailsResponseDetails; function GetAuthDetailsResponseType() { parent::AbstractResponseType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'GetAuthDetailsResponseDetails' => array ( 'required' => true, 'type' => 'GetAuthDetailsResponseDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getGetAuthDetailsResponseDetails() { return $this->GetAuthDetailsResponseDetails; } function setGetAuthDetailsResponseDetails($GetAuthDetailsResponseDetails, $charset = 'iso-8859-1') { $this->GetAuthDetailsResponseDetails = $GetAuthDetailsResponseDetails; $this->_elements['GetAuthDetailsResponseDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/GetAuthDetailsResponseType.php
PHP
asf20
1,189
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * CreateMobilePaymentRequestDetailsType * * @package PayPal */ class CreateMobilePaymentRequestDetailsType extends XSDSimpleType { /** * Type of the payment */ var $PaymentType; /** * How you want to obtain payment. Defaults to Sale. */ var $PaymentAction; /** * Phone number of the user making the payment. */ var $SenderPhone; /** * Type of recipient specified, i.e., phone number or email address */ var $RecipientType; /** * Email address of the recipient */ var $RecipientEmail; /** * Phone number of the recipipent */ var $RecipientPhone; /** * Amount of item before tax and shipping */ var $ItemAmount; /** * The tax charged on the transaction Tax */ var $Tax; /** * Per-transaction shipping charge */ var $Shipping; /** * Name of the item being ordered */ var $ItemName; /** * SKU of the item being ordered */ var $ItemNumber; /** * Memo entered by sender in PayPal Website Payments note field. */ var $Note; /** * Unique ID for the order. Required for non-P2P transactions */ var $CustomID; /** * Indicates whether the sender's phone number will be shared with recipient */ var $SharePhoneNumber; /** * Indicates whether the sender's home address will be shared with recipient */ var $ShareHomeAddress; function CreateMobilePaymentRequestDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'PaymentType' => array ( 'required' => true, 'type' => 'MobilePaymentCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentAction' => array ( 'required' => true, 'type' => 'PaymentActionCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SenderPhone' => array ( 'required' => true, 'type' => 'PhoneNumberType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'RecipientType' => array ( 'required' => true, 'type' => 'MobileRecipientCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'RecipientEmail' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'RecipientPhone' => array ( 'required' => false, 'type' => 'PhoneNumberType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ItemAmount' => array ( 'required' => true, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Tax' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Shipping' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ItemName' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ItemNumber' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Note' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'CustomID' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SharePhoneNumber' => array ( 'required' => false, 'type' => 'integer', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ShareHomeAddress' => array ( 'required' => false, 'type' => 'integer', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getPaymentType() { return $this->PaymentType; } function setPaymentType($PaymentType, $charset = 'iso-8859-1') { $this->PaymentType = $PaymentType; $this->_elements['PaymentType']['charset'] = $charset; } function getPaymentAction() { return $this->PaymentAction; } function setPaymentAction($PaymentAction, $charset = 'iso-8859-1') { $this->PaymentAction = $PaymentAction; $this->_elements['PaymentAction']['charset'] = $charset; } function getSenderPhone() { return $this->SenderPhone; } function setSenderPhone($SenderPhone, $charset = 'iso-8859-1') { $this->SenderPhone = $SenderPhone; $this->_elements['SenderPhone']['charset'] = $charset; } function getRecipientType() { return $this->RecipientType; } function setRecipientType($RecipientType, $charset = 'iso-8859-1') { $this->RecipientType = $RecipientType; $this->_elements['RecipientType']['charset'] = $charset; } function getRecipientEmail() { return $this->RecipientEmail; } function setRecipientEmail($RecipientEmail, $charset = 'iso-8859-1') { $this->RecipientEmail = $RecipientEmail; $this->_elements['RecipientEmail']['charset'] = $charset; } function getRecipientPhone() { return $this->RecipientPhone; } function setRecipientPhone($RecipientPhone, $charset = 'iso-8859-1') { $this->RecipientPhone = $RecipientPhone; $this->_elements['RecipientPhone']['charset'] = $charset; } function getItemAmount() { return $this->ItemAmount; } function setItemAmount($ItemAmount, $charset = 'iso-8859-1') { $this->ItemAmount = $ItemAmount; $this->_elements['ItemAmount']['charset'] = $charset; } function getTax() { return $this->Tax; } function setTax($Tax, $charset = 'iso-8859-1') { $this->Tax = $Tax; $this->_elements['Tax']['charset'] = $charset; } function getShipping() { return $this->Shipping; } function setShipping($Shipping, $charset = 'iso-8859-1') { $this->Shipping = $Shipping; $this->_elements['Shipping']['charset'] = $charset; } function getItemName() { return $this->ItemName; } function setItemName($ItemName, $charset = 'iso-8859-1') { $this->ItemName = $ItemName; $this->_elements['ItemName']['charset'] = $charset; } function getItemNumber() { return $this->ItemNumber; } function setItemNumber($ItemNumber, $charset = 'iso-8859-1') { $this->ItemNumber = $ItemNumber; $this->_elements['ItemNumber']['charset'] = $charset; } function getNote() { return $this->Note; } function setNote($Note, $charset = 'iso-8859-1') { $this->Note = $Note; $this->_elements['Note']['charset'] = $charset; } function getCustomID() { return $this->CustomID; } function setCustomID($CustomID, $charset = 'iso-8859-1') { $this->CustomID = $CustomID; $this->_elements['CustomID']['charset'] = $charset; } function getSharePhoneNumber() { return $this->SharePhoneNumber; } function setSharePhoneNumber($SharePhoneNumber, $charset = 'iso-8859-1') { $this->SharePhoneNumber = $SharePhoneNumber; $this->_elements['SharePhoneNumber']['charset'] = $charset; } function getShareHomeAddress() { return $this->ShareHomeAddress; } function setShareHomeAddress($ShareHomeAddress, $charset = 'iso-8859-1') { $this->ShareHomeAddress = $ShareHomeAddress; $this->_elements['ShareHomeAddress']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/CreateMobilePaymentRequestDetailsType.php
PHP
asf20
9,014
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractResponseType.php'; /** * BMGetInventoryResponseType * * @package PayPal */ class BMGetInventoryResponseType extends AbstractResponseType { var $HostedButtonID; var $TrackInv; var $TrackPnl; var $ItemTrackingDetails; var $OptionIndex; var $OptionName; var $OptionTrackingDetails; var $SoldoutURL; var $DigitalDownloadKeys; function BMGetInventoryResponseType() { parent::AbstractResponseType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'HostedButtonID' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), 'TrackInv' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), 'TrackPnl' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), 'ItemTrackingDetails' => array ( 'required' => false, 'type' => 'ItemTrackingDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'OptionIndex' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), 'OptionName' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), 'OptionTrackingDetails' => array ( 'required' => false, 'type' => 'OptionTrackingDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SoldoutURL' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), 'DigitalDownloadKeys' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), )); } function getHostedButtonID() { return $this->HostedButtonID; } function setHostedButtonID($HostedButtonID, $charset = 'iso-8859-1') { $this->HostedButtonID = $HostedButtonID; $this->_elements['HostedButtonID']['charset'] = $charset; } function getTrackInv() { return $this->TrackInv; } function setTrackInv($TrackInv, $charset = 'iso-8859-1') { $this->TrackInv = $TrackInv; $this->_elements['TrackInv']['charset'] = $charset; } function getTrackPnl() { return $this->TrackPnl; } function setTrackPnl($TrackPnl, $charset = 'iso-8859-1') { $this->TrackPnl = $TrackPnl; $this->_elements['TrackPnl']['charset'] = $charset; } function getItemTrackingDetails() { return $this->ItemTrackingDetails; } function setItemTrackingDetails($ItemTrackingDetails, $charset = 'iso-8859-1') { $this->ItemTrackingDetails = $ItemTrackingDetails; $this->_elements['ItemTrackingDetails']['charset'] = $charset; } function getOptionIndex() { return $this->OptionIndex; } function setOptionIndex($OptionIndex, $charset = 'iso-8859-1') { $this->OptionIndex = $OptionIndex; $this->_elements['OptionIndex']['charset'] = $charset; } function getOptionName() { return $this->OptionName; } function setOptionName($OptionName, $charset = 'iso-8859-1') { $this->OptionName = $OptionName; $this->_elements['OptionName']['charset'] = $charset; } function getOptionTrackingDetails() { return $this->OptionTrackingDetails; } function setOptionTrackingDetails($OptionTrackingDetails, $charset = 'iso-8859-1') { $this->OptionTrackingDetails = $OptionTrackingDetails; $this->_elements['OptionTrackingDetails']['charset'] = $charset; } function getSoldoutURL() { return $this->SoldoutURL; } function setSoldoutURL($SoldoutURL, $charset = 'iso-8859-1') { $this->SoldoutURL = $SoldoutURL; $this->_elements['SoldoutURL']['charset'] = $charset; } function getDigitalDownloadKeys() { return $this->DigitalDownloadKeys; } function setDigitalDownloadKeys($DigitalDownloadKeys, $charset = 'iso-8859-1') { $this->DigitalDownloadKeys = $DigitalDownloadKeys; $this->_elements['DigitalDownloadKeys']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/bmgetinventoryresponsetype.php
PHP
asf20
5,120
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractResponseType.php'; /** * UpdateAccessPermissionsResponseType * * @package PayPal */ class UpdateAccessPermissionsResponseType extends AbstractResponseType { /** * The status of the update call, Success/Failure. */ var $Status; function UpdateAccessPermissionsResponseType() { parent::AbstractResponseType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'Status' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), )); } function getStatus() { return $this->Status; } function setStatus($Status, $charset = 'iso-8859-1') { $this->Status = $Status; $this->_elements['Status']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/UpdateAccessPermissionsResponseType.php
PHP
asf20
1,044
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * SetAccessPermissionsRequestDetailsType * * @package PayPal */ class SetAccessPermissionsRequestDetailsType extends XSDSimpleType { /** * URL to which the customer's browser is returned after choosing to login with * PayPal. */ var $ReturnURL; /** * URL to which the customer is returned if he does not approve the use of PayPal * login. */ var $CancelURL; /** * URL to which the customer's browser is returned after user logs out from PayPal. */ var $LogoutURL; /** * The type of the flow. */ var $InitFlowType; /** * The used to decide SkipLogin allowed or not. */ var $SkipLoginPage; /** * contains information about API Services */ var $RequiredAccessPermissions; /** * contains information about API Services */ var $OptionalAccessPermissions; /** * Locale of pages displayed by PayPal during Authentication Login. */ var $LocaleCode; /** * Sets the Custom Payment Page Style for flow pages associated with this * button/link. PageStyle corresponds to the HTML variable page_style for * customizing flow pages. The value is the same as the Page Style Name you chose * when adding or editing the page style from the Profile subtab of the My Account * tab of your PayPal account. */ var $PageStyle; /** * A URL for the image you want to appear at the top left of the flow page. The * image has a maximum size of 750 pixels wide by 90 pixels high. PayPal recommends * that you provide an image that is stored on a secure (https) server. */ var $cpp_header_image; /** * Sets the border color around the header of the flow page. The border is a * 2-pixel perimeter around the header space, which is 750 pixels wide by 90 pixels * high. */ var $cpp_header_border_color; /** * Sets the background color for the header of the flow page. */ var $cpp_header_back_color; /** * Sets the background color for the payment page. */ var $cpp_payflow_color; /** * First Name of the user, this information is used if user chooses to signup with * PayPal. */ var $FirstName; /** * Last Name of the user, this information is used if user chooses to signup with * PayPal. */ var $LastName; /** * User address, this information is used when user chooses to signup for PayPal. */ var $Address; function SetAccessPermissionsRequestDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'ReturnURL' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'CancelURL' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'LogoutURL' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'InitFlowType' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SkipLoginPage' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'RequiredAccessPermissions' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'OptionalAccessPermissions' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'LocaleCode' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PageStyle' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'cpp_header_image' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'cpp_header_border_color' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'cpp_header_back_color' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'cpp_payflow_color' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'FirstName' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'LastName' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Address' => array ( 'required' => false, 'type' => 'AddressType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getReturnURL() { return $this->ReturnURL; } function setReturnURL($ReturnURL, $charset = 'iso-8859-1') { $this->ReturnURL = $ReturnURL; $this->_elements['ReturnURL']['charset'] = $charset; } function getCancelURL() { return $this->CancelURL; } function setCancelURL($CancelURL, $charset = 'iso-8859-1') { $this->CancelURL = $CancelURL; $this->_elements['CancelURL']['charset'] = $charset; } function getLogoutURL() { return $this->LogoutURL; } function setLogoutURL($LogoutURL, $charset = 'iso-8859-1') { $this->LogoutURL = $LogoutURL; $this->_elements['LogoutURL']['charset'] = $charset; } function getInitFlowType() { return $this->InitFlowType; } function setInitFlowType($InitFlowType, $charset = 'iso-8859-1') { $this->InitFlowType = $InitFlowType; $this->_elements['InitFlowType']['charset'] = $charset; } function getSkipLoginPage() { return $this->SkipLoginPage; } function setSkipLoginPage($SkipLoginPage, $charset = 'iso-8859-1') { $this->SkipLoginPage = $SkipLoginPage; $this->_elements['SkipLoginPage']['charset'] = $charset; } function getRequiredAccessPermissions() { return $this->RequiredAccessPermissions; } function setRequiredAccessPermissions($RequiredAccessPermissions, $charset = 'iso-8859-1') { $this->RequiredAccessPermissions = $RequiredAccessPermissions; $this->_elements['RequiredAccessPermissions']['charset'] = $charset; } function getOptionalAccessPermissions() { return $this->OptionalAccessPermissions; } function setOptionalAccessPermissions($OptionalAccessPermissions, $charset = 'iso-8859-1') { $this->OptionalAccessPermissions = $OptionalAccessPermissions; $this->_elements['OptionalAccessPermissions']['charset'] = $charset; } function getLocaleCode() { return $this->LocaleCode; } function setLocaleCode($LocaleCode, $charset = 'iso-8859-1') { $this->LocaleCode = $LocaleCode; $this->_elements['LocaleCode']['charset'] = $charset; } function getPageStyle() { return $this->PageStyle; } function setPageStyle($PageStyle, $charset = 'iso-8859-1') { $this->PageStyle = $PageStyle; $this->_elements['PageStyle']['charset'] = $charset; } function getcpp_header_image() { return $this->cpp_header_image; } function setcpp_header_image($cpp_header_image, $charset = 'iso-8859-1') { $this->cpp_header_image = $cpp_header_image; $this->_elements['cpp_header_image']['charset'] = $charset; } function getcpp_header_border_color() { return $this->cpp_header_border_color; } function setcpp_header_border_color($cpp_header_border_color, $charset = 'iso-8859-1') { $this->cpp_header_border_color = $cpp_header_border_color; $this->_elements['cpp_header_border_color']['charset'] = $charset; } function getcpp_header_back_color() { return $this->cpp_header_back_color; } function setcpp_header_back_color($cpp_header_back_color, $charset = 'iso-8859-1') { $this->cpp_header_back_color = $cpp_header_back_color; $this->_elements['cpp_header_back_color']['charset'] = $charset; } function getcpp_payflow_color() { return $this->cpp_payflow_color; } function setcpp_payflow_color($cpp_payflow_color, $charset = 'iso-8859-1') { $this->cpp_payflow_color = $cpp_payflow_color; $this->_elements['cpp_payflow_color']['charset'] = $charset; } function getFirstName() { return $this->FirstName; } function setFirstName($FirstName, $charset = 'iso-8859-1') { $this->FirstName = $FirstName; $this->_elements['FirstName']['charset'] = $charset; } function getLastName() { return $this->LastName; } function setLastName($LastName, $charset = 'iso-8859-1') { $this->LastName = $LastName; $this->_elements['LastName']['charset'] = $charset; } function getAddress() { return $this->Address; } function setAddress($Address, $charset = 'iso-8859-1') { $this->Address = $Address; $this->_elements['Address']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/SetAccessPermissionsRequestDetailsType.php
PHP
asf20
10,860
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * GetBalanceRequestType * * @package PayPal */ class GetBalanceRequestType extends AbstractRequestType { var $ReturnAllCurrencies; function GetBalanceRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'ReturnAllCurrencies' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), )); } function getReturnAllCurrencies() { return $this->ReturnAllCurrencies; } function setReturnAllCurrencies($ReturnAllCurrencies, $charset = 'iso-8859-1') { $this->ReturnAllCurrencies = $ReturnAllCurrencies; $this->_elements['ReturnAllCurrencies']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/GetBalanceRequestType.php
PHP
asf20
1,046
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * DoMobileCheckoutPaymentRequestType * * @package PayPal */ class DoMobileCheckoutPaymentRequestType extends AbstractRequestType { /** * A timestamped token, the value of which was returned by * SetMobileCheckoutResponse. */ var $Token; function DoMobileCheckoutPaymentRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'Token' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI', ), )); } function getToken() { return $this->Token; } function setToken($Token, $charset = 'iso-8859-1') { $this->Token = $Token; $this->_elements['Token']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/DoMobileCheckoutPaymentRequestType.php
PHP
asf20
1,071
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * BasicAmountType * * On requests, you must set the currencyID attribute to one of the three-character * currency codes for any of the supported PayPal currencies. * * @package PayPal */ class BasicAmountType extends XSDSimpleType { function BasicAmountType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:CoreComponentTypes'; $this->_attributes = array_merge($this->_attributes, array ( 'currencyID' => array ( 'name' => 'currencyID', 'type' => 'ebl:CurrencyCodeType', 'use' => 'required', ), )); } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/BasicAmountType.php
PHP
asf20
813
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * CreateRecurringPaymentsProfileRequestType * * @package PayPal */ class CreateRecurringPaymentsProfileRequestType extends AbstractRequestType { var $CreateRecurringPaymentsProfileRequestDetails; function CreateRecurringPaymentsProfileRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'CreateRecurringPaymentsProfileRequestDetails' => array ( 'required' => true, 'type' => 'CreateRecurringPaymentsProfileRequestDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getCreateRecurringPaymentsProfileRequestDetails() { return $this->CreateRecurringPaymentsProfileRequestDetails; } function setCreateRecurringPaymentsProfileRequestDetails($CreateRecurringPaymentsProfileRequestDetails, $charset = 'iso-8859-1') { $this->CreateRecurringPaymentsProfileRequestDetails = $CreateRecurringPaymentsProfileRequestDetails; $this->_elements['CreateRecurringPaymentsProfileRequestDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/CreateRecurringPaymentsProfileRequestType.php
PHP
asf20
1,381
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractResponseType.php'; /** * GetTransactionDetailsResponseType * * @package PayPal */ class GetTransactionDetailsResponseType extends AbstractResponseType { var $PaymentTransactionDetails; var $ThreeDSecureDetails; function GetTransactionDetailsResponseType() { parent::AbstractResponseType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'PaymentTransactionDetails' => array ( 'required' => true, 'type' => 'PaymentTransactionType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ThreeDSecureDetails' => array ( 'required' => true, 'type' => 'ThreeDSecureInfoType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getPaymentTransactionDetails() { return $this->PaymentTransactionDetails; } function setPaymentTransactionDetails($PaymentTransactionDetails, $charset = 'iso-8859-1') { $this->PaymentTransactionDetails = $PaymentTransactionDetails; $this->_elements['PaymentTransactionDetails']['charset'] = $charset; } function getThreeDSecureDetails() { return $this->ThreeDSecureDetails; } function setThreeDSecureDetails($ThreeDSecureDetails, $charset = 'iso-8859-1') { $this->ThreeDSecureDetails = $ThreeDSecureDetails; $this->_elements['ThreeDSecureDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/GetTransactionDetailsResponseType.php
PHP
asf20
1,743
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/AbstractRequestType.php'; /** * EnterBoardingRequestType * * @package PayPal */ class EnterBoardingRequestType extends AbstractRequestType { var $EnterBoardingRequestDetails; function EnterBoardingRequestType() { parent::AbstractRequestType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array ( 'EnterBoardingRequestDetails' => array ( 'required' => true, 'type' => 'EnterBoardingRequestDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getEnterBoardingRequestDetails() { return $this->EnterBoardingRequestDetails; } function setEnterBoardingRequestDetails($EnterBoardingRequestDetails, $charset = 'iso-8859-1') { $this->EnterBoardingRequestDetails = $EnterBoardingRequestDetails; $this->_elements['EnterBoardingRequestDetails']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/EnterBoardingRequestType.php
PHP
asf20
1,160
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * TaxInfoType * * @package PayPal */ class TaxInfoType extends XSDSimpleType { var $TaxAmount; var $SalesTaxPercentage; var $TaxState; function TaxInfoType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'TaxAmount' => array ( 'required' => true, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SalesTaxPercentage' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'TaxState' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getTaxAmount() { return $this->TaxAmount; } function setTaxAmount($TaxAmount, $charset = 'iso-8859-1') { $this->TaxAmount = $TaxAmount; $this->_elements['TaxAmount']['charset'] = $charset; } function getSalesTaxPercentage() { return $this->SalesTaxPercentage; } function setSalesTaxPercentage($SalesTaxPercentage, $charset = 'iso-8859-1') { $this->SalesTaxPercentage = $SalesTaxPercentage; $this->_elements['SalesTaxPercentage']['charset'] = $charset; } function getTaxState() { return $this->TaxState; } function setTaxState($TaxState, $charset = 'iso-8859-1') { $this->TaxState = $TaxState; $this->_elements['TaxState']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/TaxInfoType.php
PHP
asf20
1,958
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * ReverseTransactionResponseDetailsType * * @package PayPal */ class ReverseTransactionResponseDetailsType extends XSDSimpleType { /** * Unique transaction identifier of the reversal transaction created. */ var $ReverseTransactionID; /** * Status of reversal request. */ var $Status; function ReverseTransactionResponseDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'ReverseTransactionID' => array ( 'required' => false, 'type' => 'TransactionId', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Status' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getReverseTransactionID() { return $this->ReverseTransactionID; } function setReverseTransactionID($ReverseTransactionID, $charset = 'iso-8859-1') { $this->ReverseTransactionID = $ReverseTransactionID; $this->_elements['ReverseTransactionID']['charset'] = $charset; } function getStatus() { return $this->Status; } function setStatus($Status, $charset = 'iso-8859-1') { $this->Status = $Status; $this->_elements['Status']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/ReverseTransactionResponseDetailsType.php
PHP
asf20
1,700
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * EnhancedCheckoutDataType * * @package PayPal */ class EnhancedCheckoutDataType extends XSDSimpleType { function EnhancedCheckoutDataType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:EnhancedDataTypes'; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/EnhancedCheckoutDataType.php
PHP
asf20
395
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * DoReferenceTransactionResponseDetailsType * * @package PayPal */ class DoReferenceTransactionResponseDetailsType extends XSDSimpleType { var $BillingAgreementID; var $PaymentInfo; var $Amount; var $AVSCode; var $CVV2Code; var $TransactionID; function DoReferenceTransactionResponseDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'BillingAgreementID' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentInfo' => array ( 'required' => false, 'type' => 'PaymentInfoType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Amount' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'AVSCode' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'CVV2Code' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'TransactionID' => array ( 'required' => false, 'type' => 'TransactionId', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getBillingAgreementID() { return $this->BillingAgreementID; } function setBillingAgreementID($BillingAgreementID, $charset = 'iso-8859-1') { $this->BillingAgreementID = $BillingAgreementID; $this->_elements['BillingAgreementID']['charset'] = $charset; } function getPaymentInfo() { return $this->PaymentInfo; } function setPaymentInfo($PaymentInfo, $charset = 'iso-8859-1') { $this->PaymentInfo = $PaymentInfo; $this->_elements['PaymentInfo']['charset'] = $charset; } function getAmount() { return $this->Amount; } function setAmount($Amount, $charset = 'iso-8859-1') { $this->Amount = $Amount; $this->_elements['Amount']['charset'] = $charset; } function getAVSCode() { return $this->AVSCode; } function setAVSCode($AVSCode, $charset = 'iso-8859-1') { $this->AVSCode = $AVSCode; $this->_elements['AVSCode']['charset'] = $charset; } function getCVV2Code() { return $this->CVV2Code; } function setCVV2Code($CVV2Code, $charset = 'iso-8859-1') { $this->CVV2Code = $CVV2Code; $this->_elements['CVV2Code']['charset'] = $charset; } function getTransactionID() { return $this->TransactionID; } function setTransactionID($TransactionID, $charset = 'iso-8859-1') { $this->TransactionID = $TransactionID; $this->_elements['TransactionID']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/DoReferenceTransactionResponseDetailsType.php
PHP
asf20
3,507
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * BillOutstandingAmountRequestDetailsType * * @package PayPal */ class BillOutstandingAmountRequestDetailsType extends XSDSimpleType { var $ProfileID; var $Amount; var $Note; function BillOutstandingAmountRequestDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'ProfileID' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Amount' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Note' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getProfileID() { return $this->ProfileID; } function setProfileID($ProfileID, $charset = 'iso-8859-1') { $this->ProfileID = $ProfileID; $this->_elements['ProfileID']['charset'] = $charset; } function getAmount() { return $this->Amount; } function setAmount($Amount, $charset = 'iso-8859-1') { $this->Amount = $Amount; $this->_elements['Amount']['charset'] = $charset; } function getNote() { return $this->Note; } function setNote($Note, $charset = 'iso-8859-1') { $this->Note = $Note; $this->_elements['Note']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/BillOutstandingAmountRequestDetailsType.php
PHP
asf20
1,900
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * DoCaptureResponseDetailsType * * @package PayPal */ class DoCaptureResponseDetailsType extends XSDSimpleType { /** * The authorization identification number you specified in the request. */ var $AuthorizationID; /** * Information about the transaction */ var $PaymentInfo; function DoCaptureResponseDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'AuthorizationID' => array ( 'required' => true, 'type' => NULL, 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentInfo' => array ( 'required' => true, 'type' => 'PaymentInfoType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getAuthorizationID() { return $this->AuthorizationID; } function setAuthorizationID($AuthorizationID, $charset = 'iso-8859-1') { $this->AuthorizationID = $AuthorizationID; $this->_elements['AuthorizationID']['charset'] = $charset; } function getPaymentInfo() { return $this->PaymentInfo; } function setPaymentInfo($PaymentInfo, $charset = 'iso-8859-1') { $this->PaymentInfo = $PaymentInfo; $this->_elements['PaymentInfo']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/DoCaptureResponseDetailsType.php
PHP
asf20
1,679
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * PaymentInfoType * * PaymentInfoType Payment information. * * @package PayPal */ class PaymentInfoType extends XSDSimpleType { /** * A transaction identification number. */ var $TransactionID; /** * Its Ebay transaction id. */ var $EbayTransactionID; /** * Parent or related transaction identification number. This field is populated for * the following transaction types: */ var $ParentTransactionID; /** * Receipt ID */ var $ReceiptID; /** * The type of transaction */ var $TransactionType; /** * The type of payment */ var $PaymentType; /** * The type of funding source */ var $RefundSourceCodeType; /** * eCheck latest expected clear date */ var $ExpectedeCheckClearDate; /** * Date and time of payment */ var $PaymentDate; /** * Full amount of the customer's payment, before transaction fee is subtracted */ var $GrossAmount; /** * Transaction fee associated with the payment */ var $FeeAmount; /** * Amount deposited into the account's primary balance after a currency conversion * from automatic conversion through your Payment Receiving Preferences or manual * conversion through manually accepting a payment. This amount is calculated after * fees and taxes have been assessed. */ var $SettleAmount; /** * Amount of tax for transaction */ var $TaxAmount; /** * Exchange rate for transaction */ var $ExchangeRate; /** * The status of the payment: */ var $PaymentStatus; /** * The reason the payment is pending: none: No pending reason */ var $PendingReason; /** * The reason for a reversal if TransactionType is reversal: none: No reason code */ var $ReasonCode; /** * Shipping method selected by the user during check-out. */ var $ShippingMethod; /** * Protection Eligibility for this Transaction - None, SPP or ESPP */ var $ProtectionEligibility; /** * Protection Eligibility details for this Transaction */ var $ProtectionEligibilityType; /** * Amount of shipping charged on transaction */ var $ShipAmount; /** * Amount of ship handling charged on transaction */ var $ShipHandleAmount; /** * Amount of shipping discount on transaction */ var $ShipDiscount; /** * Amount of Insurance amount on transaction */ var $InsuranceAmount; /** * Subject as entered in the transaction */ var $Subject; /** * Details about the seller. */ var $SellerDetails; /** * Unique identifier and mandatory for each bucket in case of split payement */ var $PaymentRequestID; /** * Thes are filters that could result in accept/deny/pending action. */ var $FMFDetails; /** * This will be enhanced info for the payment: Example: UATP details */ var $EnhancedPaymentInfo; /** * This will indicate the payment status for individual payment request in case of * split payment */ var $PaymentError; function PaymentInfoType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'TransactionID' => array ( 'required' => true, 'type' => NULL, 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'EbayTransactionID' => array ( 'required' => true, 'type' => NULL, 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ParentTransactionID' => array ( 'required' => false, 'type' => 'TransactionId', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ReceiptID' => array ( 'required' => false, 'type' => NULL, 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'TransactionType' => array ( 'required' => true, 'type' => 'PaymentTransactionCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentType' => array ( 'required' => false, 'type' => 'PaymentCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'RefundSourceCodeType' => array ( 'required' => false, 'type' => 'RefundSourceCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ExpectedeCheckClearDate' => array ( 'required' => true, 'type' => 'dateTime', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentDate' => array ( 'required' => true, 'type' => 'dateTime', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'GrossAmount' => array ( 'required' => true, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'FeeAmount' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SettleAmount' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'TaxAmount' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ExchangeRate' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentStatus' => array ( 'required' => true, 'type' => 'PaymentStatusCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PendingReason' => array ( 'required' => false, 'type' => 'PendingStatusCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ReasonCode' => array ( 'required' => false, 'type' => 'ReversalReasonCodeType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ShippingMethod' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ProtectionEligibility' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ProtectionEligibilityType' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ShipAmount' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ShipHandleAmount' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ShipDiscount' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'InsuranceAmount' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Subject' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SellerDetails' => array ( 'required' => false, 'type' => 'SellerDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentRequestID' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'FMFDetails' => array ( 'required' => false, 'type' => 'FMFDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'EnhancedPaymentInfo' => array ( 'required' => false, 'type' => 'EnhancedPaymentInfoType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'PaymentError' => array ( 'required' => false, 'type' => 'ErrorType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getTransactionID() { return $this->TransactionID; } function setTransactionID($TransactionID, $charset = 'iso-8859-1') { $this->TransactionID = $TransactionID; $this->_elements['TransactionID']['charset'] = $charset; } function getEbayTransactionID() { return $this->EbayTransactionID; } function setEbayTransactionID($EbayTransactionID, $charset = 'iso-8859-1') { $this->EbayTransactionID = $EbayTransactionID; $this->_elements['EbayTransactionID']['charset'] = $charset; } function getParentTransactionID() { return $this->ParentTransactionID; } function setParentTransactionID($ParentTransactionID, $charset = 'iso-8859-1') { $this->ParentTransactionID = $ParentTransactionID; $this->_elements['ParentTransactionID']['charset'] = $charset; } function getReceiptID() { return $this->ReceiptID; } function setReceiptID($ReceiptID, $charset = 'iso-8859-1') { $this->ReceiptID = $ReceiptID; $this->_elements['ReceiptID']['charset'] = $charset; } function getTransactionType() { return $this->TransactionType; } function setTransactionType($TransactionType, $charset = 'iso-8859-1') { $this->TransactionType = $TransactionType; $this->_elements['TransactionType']['charset'] = $charset; } function getPaymentType() { return $this->PaymentType; } function setPaymentType($PaymentType, $charset = 'iso-8859-1') { $this->PaymentType = $PaymentType; $this->_elements['PaymentType']['charset'] = $charset; } function getRefundSourceCodeType() { return $this->RefundSourceCodeType; } function setRefundSourceCodeType($RefundSourceCodeType, $charset = 'iso-8859-1') { $this->RefundSourceCodeType = $RefundSourceCodeType; $this->_elements['RefundSourceCodeType']['charset'] = $charset; } function getExpectedeCheckClearDate() { return $this->ExpectedeCheckClearDate; } function setExpectedeCheckClearDate($ExpectedeCheckClearDate, $charset = 'iso-8859-1') { $this->ExpectedeCheckClearDate = $ExpectedeCheckClearDate; $this->_elements['ExpectedeCheckClearDate']['charset'] = $charset; } function getPaymentDate() { return $this->PaymentDate; } function setPaymentDate($PaymentDate, $charset = 'iso-8859-1') { $this->PaymentDate = $PaymentDate; $this->_elements['PaymentDate']['charset'] = $charset; } function getGrossAmount() { return $this->GrossAmount; } function setGrossAmount($GrossAmount, $charset = 'iso-8859-1') { $this->GrossAmount = $GrossAmount; $this->_elements['GrossAmount']['charset'] = $charset; } function getFeeAmount() { return $this->FeeAmount; } function setFeeAmount($FeeAmount, $charset = 'iso-8859-1') { $this->FeeAmount = $FeeAmount; $this->_elements['FeeAmount']['charset'] = $charset; } function getSettleAmount() { return $this->SettleAmount; } function setSettleAmount($SettleAmount, $charset = 'iso-8859-1') { $this->SettleAmount = $SettleAmount; $this->_elements['SettleAmount']['charset'] = $charset; } function getTaxAmount() { return $this->TaxAmount; } function setTaxAmount($TaxAmount, $charset = 'iso-8859-1') { $this->TaxAmount = $TaxAmount; $this->_elements['TaxAmount']['charset'] = $charset; } function getExchangeRate() { return $this->ExchangeRate; } function setExchangeRate($ExchangeRate, $charset = 'iso-8859-1') { $this->ExchangeRate = $ExchangeRate; $this->_elements['ExchangeRate']['charset'] = $charset; } function getPaymentStatus() { return $this->PaymentStatus; } function setPaymentStatus($PaymentStatus, $charset = 'iso-8859-1') { $this->PaymentStatus = $PaymentStatus; $this->_elements['PaymentStatus']['charset'] = $charset; } function getPendingReason() { return $this->PendingReason; } function setPendingReason($PendingReason, $charset = 'iso-8859-1') { $this->PendingReason = $PendingReason; $this->_elements['PendingReason']['charset'] = $charset; } function getReasonCode() { return $this->ReasonCode; } function setReasonCode($ReasonCode, $charset = 'iso-8859-1') { $this->ReasonCode = $ReasonCode; $this->_elements['ReasonCode']['charset'] = $charset; } function getShippingMethod() { return $this->ShippingMethod; } function setShippingMethod($ShippingMethod, $charset = 'iso-8859-1') { $this->ShippingMethod = $ShippingMethod; $this->_elements['ShippingMethod']['charset'] = $charset; } function getProtectionEligibility() { return $this->ProtectionEligibility; } function setProtectionEligibility($ProtectionEligibility, $charset = 'iso-8859-1') { $this->ProtectionEligibility = $ProtectionEligibility; $this->_elements['ProtectionEligibility']['charset'] = $charset; } function getProtectionEligibilityType() { return $this->ProtectionEligibilityType; } function setProtectionEligibilityType($ProtectionEligibilityType, $charset = 'iso-8859-1') { $this->ProtectionEligibilityType = $ProtectionEligibilityType; $this->_elements['ProtectionEligibilityType']['charset'] = $charset; } function getShipAmount() { return $this->ShipAmount; } function setShipAmount($ShipAmount, $charset = 'iso-8859-1') { $this->ShipAmount = $ShipAmount; $this->_elements['ShipAmount']['charset'] = $charset; } function getShipHandleAmount() { return $this->ShipHandleAmount; } function setShipHandleAmount($ShipHandleAmount, $charset = 'iso-8859-1') { $this->ShipHandleAmount = $ShipHandleAmount; $this->_elements['ShipHandleAmount']['charset'] = $charset; } function getShipDiscount() { return $this->ShipDiscount; } function setShipDiscount($ShipDiscount, $charset = 'iso-8859-1') { $this->ShipDiscount = $ShipDiscount; $this->_elements['ShipDiscount']['charset'] = $charset; } function getInsuranceAmount() { return $this->InsuranceAmount; } function setInsuranceAmount($InsuranceAmount, $charset = 'iso-8859-1') { $this->InsuranceAmount = $InsuranceAmount; $this->_elements['InsuranceAmount']['charset'] = $charset; } function getSubject() { return $this->Subject; } function setSubject($Subject, $charset = 'iso-8859-1') { $this->Subject = $Subject; $this->_elements['Subject']['charset'] = $charset; } function getSellerDetails() { return $this->SellerDetails; } function setSellerDetails($SellerDetails, $charset = 'iso-8859-1') { $this->SellerDetails = $SellerDetails; $this->_elements['SellerDetails']['charset'] = $charset; } function getPaymentRequestID() { return $this->PaymentRequestID; } function setPaymentRequestID($PaymentRequestID, $charset = 'iso-8859-1') { $this->PaymentRequestID = $PaymentRequestID; $this->_elements['PaymentRequestID']['charset'] = $charset; } function getFMFDetails() { return $this->FMFDetails; } function setFMFDetails($FMFDetails, $charset = 'iso-8859-1') { $this->FMFDetails = $FMFDetails; $this->_elements['FMFDetails']['charset'] = $charset; } function getEnhancedPaymentInfo() { return $this->EnhancedPaymentInfo; } function setEnhancedPaymentInfo($EnhancedPaymentInfo, $charset = 'iso-8859-1') { $this->EnhancedPaymentInfo = $EnhancedPaymentInfo; $this->_elements['EnhancedPaymentInfo']['charset'] = $charset; } function getPaymentError() { return $this->PaymentError; } function setPaymentError($PaymentError, $charset = 'iso-8859-1') { $this->PaymentError = $PaymentError; $this->_elements['PaymentError']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/PaymentInfoType.php
PHP
asf20
18,665
<?php /** * @package PayPal */ /** * Make sure our parent class is defined. */ require_once 'PayPal/Type/XSDSimpleType.php'; /** * SetMobileCheckoutRequestDetailsType * * @package PayPal */ class SetMobileCheckoutRequestDetailsType extends XSDSimpleType { /** * The phone number of the buyer's mobile device, if available. */ var $BuyerPhone; /** * Cost of this item before tax and shipping. You must set the currencyID attribute * to one of the three-character currency codes for any of the supported PayPal * currencies. */ var $ItemAmount; /** * Tax amount for this item. You must set the currencyID attribute to one of the * three-character currency codes for any of the supported PayPal currencies. */ var $Tax; /** * Shipping amount for this item. You must set the currencyID attribute to one of * the three-character currency codes for any of the supported PayPal currencies. */ var $Shipping; /** * Description of the item that the customer is purchasing. */ var $ItemName; /** * Reference number of the item that the customer is purchasing. */ var $ItemNumber; /** * A free-form field for your own use, such as a tracking number or other value you * want returned to you in IPN. */ var $Custom; /** * Your own unique invoice or tracking number. */ var $InvoiceID; /** * URL to which the customer's browser is returned after choosing to pay with * PayPal. PayPal recommends that the value of ReturnURL be the final review page * on which the customer confirms the order and payment. */ var $ReturnURL; /** * URL to which the customer is returned if he does not approve the use of PayPal * to pay you. PayPal recommends that the value of CancelURL be the original page * on which the customer chose to pay with PayPal. */ var $CancelURL; /** * The value 1 indicates that you require that the customer's shipping address on * file with PayPal be a confirmed address. Setting this element overrides the * setting you have specified in your Merchant Account Profile. */ var $AddressDisplayOptions; /** * The value 1 indicates that you require that the customer specifies a contact * phone for the transactxion. Default is 0 / none required. */ var $SharePhone; /** * Customer's shipping address. */ var $ShipToAddress; /** * Email address of the buyer as entered during checkout. PayPal uses this value to * pre-fill the login portion of the PayPal login page. */ var $BuyerEmail; function SetMobileCheckoutRequestDetailsType() { parent::XSDSimpleType(); $this->_namespace = 'urn:ebay:apis:eBLBaseComponents'; $this->_elements = array_merge($this->_elements, array ( 'BuyerPhone' => array ( 'required' => false, 'type' => 'PhoneNumberType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ItemAmount' => array ( 'required' => true, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Tax' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Shipping' => array ( 'required' => false, 'type' => 'BasicAmountType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ItemName' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ItemNumber' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'Custom' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'InvoiceID' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ReturnURL' => array ( 'required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'CancelURL' => array ( 'required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'AddressDisplayOptions' => array ( 'required' => false, 'type' => 'int', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'SharePhone' => array ( 'required' => false, 'type' => 'int', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'ShipToAddress' => array ( 'required' => false, 'type' => 'AddressType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), 'BuyerEmail' => array ( 'required' => false, 'type' => 'EmailAddressType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents', ), )); } function getBuyerPhone() { return $this->BuyerPhone; } function setBuyerPhone($BuyerPhone, $charset = 'iso-8859-1') { $this->BuyerPhone = $BuyerPhone; $this->_elements['BuyerPhone']['charset'] = $charset; } function getItemAmount() { return $this->ItemAmount; } function setItemAmount($ItemAmount, $charset = 'iso-8859-1') { $this->ItemAmount = $ItemAmount; $this->_elements['ItemAmount']['charset'] = $charset; } function getTax() { return $this->Tax; } function setTax($Tax, $charset = 'iso-8859-1') { $this->Tax = $Tax; $this->_elements['Tax']['charset'] = $charset; } function getShipping() { return $this->Shipping; } function setShipping($Shipping, $charset = 'iso-8859-1') { $this->Shipping = $Shipping; $this->_elements['Shipping']['charset'] = $charset; } function getItemName() { return $this->ItemName; } function setItemName($ItemName, $charset = 'iso-8859-1') { $this->ItemName = $ItemName; $this->_elements['ItemName']['charset'] = $charset; } function getItemNumber() { return $this->ItemNumber; } function setItemNumber($ItemNumber, $charset = 'iso-8859-1') { $this->ItemNumber = $ItemNumber; $this->_elements['ItemNumber']['charset'] = $charset; } function getCustom() { return $this->Custom; } function setCustom($Custom, $charset = 'iso-8859-1') { $this->Custom = $Custom; $this->_elements['Custom']['charset'] = $charset; } function getInvoiceID() { return $this->InvoiceID; } function setInvoiceID($InvoiceID, $charset = 'iso-8859-1') { $this->InvoiceID = $InvoiceID; $this->_elements['InvoiceID']['charset'] = $charset; } function getReturnURL() { return $this->ReturnURL; } function setReturnURL($ReturnURL, $charset = 'iso-8859-1') { $this->ReturnURL = $ReturnURL; $this->_elements['ReturnURL']['charset'] = $charset; } function getCancelURL() { return $this->CancelURL; } function setCancelURL($CancelURL, $charset = 'iso-8859-1') { $this->CancelURL = $CancelURL; $this->_elements['CancelURL']['charset'] = $charset; } function getAddressDisplayOptions() { return $this->AddressDisplayOptions; } function setAddressDisplayOptions($AddressDisplayOptions, $charset = 'iso-8859-1') { $this->AddressDisplayOptions = $AddressDisplayOptions; $this->_elements['AddressDisplayOptions']['charset'] = $charset; } function getSharePhone() { return $this->SharePhone; } function setSharePhone($SharePhone, $charset = 'iso-8859-1') { $this->SharePhone = $SharePhone; $this->_elements['SharePhone']['charset'] = $charset; } function getShipToAddress() { return $this->ShipToAddress; } function setShipToAddress($ShipToAddress, $charset = 'iso-8859-1') { $this->ShipToAddress = $ShipToAddress; $this->_elements['ShipToAddress']['charset'] = $charset; } function getBuyerEmail() { return $this->BuyerEmail; } function setBuyerEmail($BuyerEmail, $charset = 'iso-8859-1') { $this->BuyerEmail = $BuyerEmail; $this->_elements['BuyerEmail']['charset'] = $charset; } }
123gohelmetsv2
trunk/lib/paypal-sdk/PayPal/Type/SetMobileCheckoutRequestDetailsType.php
PHP
asf20
9,487