merge stable into default
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 05 Aug 2015 16:48:01 +0200
changeset 25 088e450c129f
parent 18 cfab51a4290b (current diff)
parent 24 87b1c861f1ca (diff)
child 26 2a219898bebc
merge stable into default
--- a/.hgtags	Thu Jul 01 19:02:26 2010 +0200
+++ b/.hgtags	Wed Aug 05 16:48:01 2015 +0200
@@ -4,3 +4,5 @@
 4a23b13047b5a756786bf9ecc817257875e66d2f cubicweb-cmcicpay-debian-version-0.2.0-1
 8b25be0693f887685bccc96da2a00ee62eecbd0e cubicweb-cmcicpay-version-0.2.1
 043a09072bdfc4fb0c7d81a4defae3b198719800 cubicweb-cmcicpay-debian-version-0.2.1-1
+d2049bf0b385aa2a01a4afb9ae2635167e6dcb92 cubicweb-cmcicpay-version-0.2.2
+cdbbc68612eb4a48ba54c936002ff973bcd27d4d cubicweb-cmcicpay-debian-version-0.2.2-1
--- a/__init__.py	Thu Jul 01 19:02:26 2010 +0200
+++ b/__init__.py	Wed Aug 05 16:48:01 2015 +0200
@@ -1,4 +1,4 @@
 """cubicweb-cmcicpay application package
 
-cmcic credit card on-line payment
+CM-CIC credit card on-line payment (merchant side) 
 """
--- a/__pkginfo__.py	Thu Jul 01 19:02:26 2010 +0200
+++ b/__pkginfo__.py	Wed Aug 05 16:48:01 2015 +0200
@@ -4,7 +4,7 @@
 modname = 'cmcicpay'
 distname = 'cubicweb-cmcicpay'
 
-numversion = (0, 2, 1)
+numversion = (0, 2, 2)
 version = '.'.join(str(num) for num in numversion)
 
 license = 'LGPL'
--- a/cmcic.py	Thu Jul 01 19:02:26 2010 +0200
+++ b/cmcic.py	Wed Aug 05 16:48:01 2015 +0200
@@ -15,6 +15,8 @@
 key: 0123456789012345678901234567890123456789
 version: 3.0
 company: acme
+server_url = http://paymentserver.com/paiement.cgi
+return_url = http://merchant.com/cmcic
 
 Submit payment
 ==============
--- a/debian/changelog	Thu Jul 01 19:02:26 2010 +0200
+++ b/debian/changelog	Wed Aug 05 16:48:01 2015 +0200
@@ -1,3 +1,9 @@
+cubicweb-cmcicpay (0.2.2-1) unstable; urgency=low
+
+  * new upstream release
+
+ -- Nicolas Chauvat <nicolas.chauvat@logilab.fr>  Sun, 28 Nov 2010 21:46:32 +0100
+
 cubicweb-cmcicpay (0.2.1-1) unstable; urgency=low
 
   * new upstream release
--- a/views.py	Thu Jul 01 19:02:26 2010 +0200
+++ b/views.py	Wed Aug 05 16:48:01 2015 +0200
@@ -42,6 +42,7 @@
     rules = [
         (rgx('/cmcic_info'), dict(vid='cmcic_info')),
         ]
+
 ## views
 
 class CmcicInfoView(StartupView):
@@ -53,7 +54,7 @@
         self.w(u'<h1>CM-CIC p@iement</h1>')
         tpe = get_tpe(self._cw)
         self.w(u'<table>')
-        for attr in ['numero','version','code_societe','url_paiement','url_ok','url_ko']:
+        for attr in ['version','tpe_number','tpe_company','server_url','return_url']:
             self.w(u'<tr><td>%s</td><td>%s</td></tr>' % (attr, getattr(tpe, attr)))
         self.w(u'</table>')
 
@@ -98,14 +99,12 @@
         if tpe.is_valid_msg(msg, mac):
             self.info('cmcic received valid message %s %s' % (repr(rep.reference), repr(rep.return_code)))
             if rep.return_code == "Annulation":
-                # Payment has been refused
+                # Payment was rejected
                 # The payment may be accepted later
-                # put your code here (email sending / Database update)
                 return 0
 
             elif rep.return_code in ("payetest", "paiement"):
-                # Payment has been accepeted on the productive server
-                # put your code here (email sending / Database update)
+                # Payment was accepted
                 comment = u'payed by %(brand)s on %(date)s, auth %(numauto)s' % rep.as_dict()
                 try:
                     self.appli.repo.shopcart_checkout(int(rep.reference), comment)
@@ -116,17 +115,13 @@
 
             #*** ONLY FOR MULTIPART PAYMENT ***#
             elif rep.return_code.startswith("paiement_pf"):
-                # Payment has been accepted on the productive server for the part #N
-                # return code is like paiement_pf[#N]
-                # put your code here (email sending / Database update)
-                # You have the amount of the payment part in Rpeification['montantech']
+                # Payment part #N was accepted
+                # return code is paiement_pf[#N], amount in Rpeification['montantech']
                 pass
 
             elif rep.return_code.startswith("Annulation_pf"):
-                # Payment has been refused on the productive server for the part #N
-                # return code is like Annulation_pf[#N]
-                # put your code here (email sending / Database update)
-                # You have the amount of the payment part in Repification['montantech']
+                # Payment part #N was rejected
+                # return code is Annulation_pf[#N], amount in Repification['montantech']
                 pass
         else:
             self.warning("cmcic received invalid message %s %s" % (repr(rep.reference), repr(rep.return_code)))