From 89a85260f988be339d1890f925ed276dea576076 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 6 May 2011 15:34:25 +0300 Subject: strip S from SN --- gsxlib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gsxlib.php') diff --git a/gsxlib.php b/gsxlib.php index 4974754..3cc2702 100644 --- a/gsxlib.php +++ b/gsxlib.php @@ -238,7 +238,7 @@ class GsxLib $req = array('ReturnLabel' => array( 'returnOrderNumber' => $returnOrder, - 'partNumber' => $partNumber + 'partNumber' => $partNumber )); return $this->request($req)->returnLabelData; @@ -273,6 +273,8 @@ class GsxLib public function warrantyStatus($serialNumber) { $serialNumber = trim($serialNumber); + // SNs should never start with an S, but they're often coded into barcodes + $serialNumber = ltrim($serialNumber, 'sS'); if (!self::looksLike($serialNumber, 'serialNumber')) { exit('Invalid serial number: ' . $serialNumber); @@ -349,5 +351,4 @@ class GsxLib } - ?> \ No newline at end of file -- cgit v1.2.3