[drakma-devel] Clozure CL Page Specific Error
    Wade Humeniuk 
    wade.humeniuk at gmail.com
       
    Wed Jun 11 00:07:31 UTC 2008
    
    
  
After reading the Hyperspec I do think it is problem with CCL's read-sequence.
I modifed CCL's source from (the code looks obviously in error)
(defmethod stream-read-vector ((stream binary-input-stream)
			       vector start end)
  (declare (fixnum start end))
  (do* ((i start (1+ i)))
       ((= i end) end)
    (declare (fixnum i))
    (let* ((b (read-byte stream))
      (if (eq b :eof)
	(return i)
	(setf (uvref vector i) b)))))
to
(defmethod stream-read-vector ((stream binary-input-stream)
			       vector start end)
  (declare (fixnum start end))
  (do* ((i start (1+ i)))
       ((= i end) end)
    (declare (fixnum i))
    (let* ((b (read-byte stream nil :eof)))
      (if (eq b :eof)
	(return i)
	(setf (uvref vector i) b)))))
and it now works for "https://esqa.moneris.com"
Just for your info Drakma is being used for Moneris credit card purchase
validatons.
Example:
CL-USER> (moneris-test::test-purchase)
(:RECEIPT (:RECEIPTID "ORDER-3422131578-72") (:REFERENCENUM
"660021630017911950") (:RESPONSECODE "027") (:ISO "01") (:AUTHCODE
"337410") (:TRANSTIME "20:06:19") (:TRANSDATE "2008-06-10")
(:TRANSTYPE "00") (:COMPLETE T) (:MESSAGE "APPROVED           *
            =") (:TRANSAMOUNT "10.00") (:CARDTYPE "V") (:TRANSID
"420704-0_7") (:TIMEDOUT NIL) (:BANKTOTALS NIL) (:TICKET NIL))
27
"APPROVED           *                    ="
"420704-0_7"
"<?xml version=\"1.0\"
standalone=\"yes\"?><response><receipt><ReceiptId>ORDER-3422131578-72</ReceiptId><ReferenceNum>660021630017911950</ReferenceNum><ResponseCode>027</ResponseCode><ISO>01</ISO><AuthCode>337410</AuthCode><TransTime>20:06:19</TransTime><TransDate>2008-06-10</TransDate><TransType>00</TransType><Complete>true</Complete><Message>APPROVED
          *
=</Message><TransAmount>10.00</TransAmount><CardType>V</CardType><TransID>420704-0_7</TransID><TimedOut>false</TimedOut><BankTotals>null</BankTotals><Ticket>null</Ticket></receipt></response>"
CL-USER>
I will submit the info to the  ClozureCL devel list.
Thanks, Wade
    
    
More information about the Drakma-devel
mailing list