[bknr-cvs] r2061 - trunk/projects/bos/worldpay-test

bknr at bknr.net bknr at bknr.net
Sun Nov 5 20:58:53 UTC 2006


Author: hhubner
Date: 2006-11-05 15:58:53 -0500 (Sun, 05 Nov 2006)
New Revision: 2061

Modified:
   trunk/projects/bos/worldpay-test/tags.lisp
   trunk/projects/bos/worldpay-test/worldpay-test.lisp
Log:
certificate generation fixed for WorldPay payment


Modified: trunk/projects/bos/worldpay-test/tags.lisp
===================================================================
--- trunk/projects/bos/worldpay-test/tags.lisp	2006-11-05 20:58:04 UTC (rev 2060)
+++ trunk/projects/bos/worldpay-test/tags.lisp	2006-11-05 20:58:53 UTC (rev 2061)
@@ -40,6 +40,7 @@
   (with-template-vars (gift email name address)
     (let ((contract (find-store-object (parse-integer (get-template-var :contract-id)))))
       (contract-issue-cert contract name :address address :language (session-variable :language))
+      (mail-worldpay-sponsor-data (get-template-var :request))
       (bknr.web::redirect-request :target (if gift "index"
 					      (format nil "profil_setup?name=~A&email=~A&sponsor-id=~A"
 						      (uriencode-string name) (uriencode-string email)
@@ -112,11 +113,6 @@
 					    strasse
 					    plz ort)
 			   :language (session-variable :language))
-      (loop
-	 do (progn
-	      (format t "~&; waiting for generation of certificate, contract-id ~A" contract-id)
-	      (sleep 2))
-	 until (probe-file (contract-pdf-pathname contract)))
       (mail-manual-sponsor-data (get-template-var :request)))))
 
 (define-bknr-tag when-certificate (&key children)

Modified: trunk/projects/bos/worldpay-test/worldpay-test.lisp
===================================================================
--- trunk/projects/bos/worldpay-test/worldpay-test.lisp	2006-11-05 20:58:04 UTC (rev 2060)
+++ trunk/projects/bos/worldpay-test/worldpay-test.lisp	2006-11-05 20:58:53 UTC (rev 2061)
@@ -27,6 +27,7 @@
     (with-query-params (request cartId name address country transStatus lang MC_gift)      
       (unless (website-supports-language lang)
 	(setf lang *default-language*))
+      (bos.m2::remember-worldpay-params cartId (all-request-params request))
       (let ((contract (get-contract (parse-integer cartId))))
 	(cond
 	  ((not (typep contract 'contract))
@@ -36,10 +37,8 @@
 	  ((equal "C" transStatus)
 	   (setf template-name #?"/$(lang)/sponsor_canceled"))
 	  ((< (contract-price contract) *mail-certificate-threshold*)
-	   (mail-worldpay-sponsor-data request)
 	   (setf template-name #?"/$(lang)/quittung"))
 	  (t
-	   (mail-worldpay-sponsor-data request)
 	   (when (<= *mail-fiscal-certificate-threshold* (contract-price contract))
 	     (mail-fiscal-certificate-to-office contract name address country))
 	   (setf template-name (if (and MC_gift (equal MC_gift "1")) #?"/$(lang)/versand_geschenk" #?"/$(lang)/versand_info")))))))




More information about the Bknr-cvs mailing list