cvs: pear /Services_Ebay/Ebay Session.php
| From: | Adam Trachtenberg | Date: | Tue, 07 Dec 2004 23:10:29 +0000 |
| Subject: | cvs: pear /Services_Ebay/Ebay Session.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-27057@lists.php.net to get a copy of this message | ||
amt Tue Dec 7 18:10:29 2004 EDT
Modified files:
/pear/Services_Ebay/Ebay Session.php
Log:
Create constants for sandbox and production URLs
http://cvs.php.net/diff.php/pear/Services_Ebay/Ebay/Session.php?r1=1.6&r2=1.7&ty=u
Index: pear/Services_Ebay/Ebay/Session.php
diff -u pear/Services_Ebay/Ebay/Session.php:1.6 pear/Services_Ebay/Ebay/Session.php:1.7
--- pear/Services_Ebay/Ebay/Session.php:1.6 Wed Dec 1 14:50:23 2004
+++ pear/Services_Ebay/Ebay/Session.php Tue Dec 7 18:10:29 2004
@@ -16,7 +16,7 @@
// | Authors: Stephan Schmidt <schst@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Session.php,v 1.6 2004/12/01 19:50:23 schst Exp $
+// $Id: Session.php,v 1.7 2004/12/07 23:10:29 amt Exp $
/**
* Services/Ebay/Session.php
@@ -44,6 +44,16 @@
const DEBUG_PRINT = 2;
/**
+ * Sandbox gateway URL
+ */
+ const URL_SANDBOX = 'https://api.sandbox.ebay.com/ws/api.dll';
+
+ /**
+ * Production gateway URL
+ */
+ const URL_PRODUCTION = 'https://api.ebay.com/ws/api.dll';
+
+ /**
* developer ID
*
* If you do not already have one, please
@@ -109,7 +119,7 @@
*
* @var string
*/
- private $url = 'https://api.sandbox.ebay.com/ws/api.dll';
+ private $url;
/**
* site id
@@ -187,8 +197,9 @@
{
$this->devId = $devId;
$this->appId = $appId;
- $this->certId = $certId;
-
+ $this->certId = $certId;
+ $this->url = self::URL_SANDBOX;
+
$opts = array(
'indent' => ' ',
'linebreak' => "\n",
@@ -259,6 +270,12 @@
* set the API URL
*
* @param string
+ *
+ * Possible values are:
+ * - Services_Ebay_Session::URL_SANDBOX
+ * - Services_Ebay_Session::URL_PRODUCTION
+ * - Other URLs as applicable
+ *
*/
public function setUrl($url)
{