projects
/
indico-PayWay
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
afd19fb
)
added shopid
master
author
Dobrica Pavlinusic
<dpavlin@indico.ffzg.hr>
Sun, 31 Jan 2016 23:27:31 +0000
(
00:27
+0100)
committer
Dobrica Pavlinusic
<dpavlin@indico.ffzg.hr>
Sun, 31 Jan 2016 23:30:09 +0000
(
00:30
+0100)
MaKaC/plugins/EPayment/payWay/epayment.py
patch
|
blob
|
history
MaKaC/plugins/EPayment/payWay/tpls/ConfModifEPaymentPayWay.tpl
patch
|
blob
|
history
MaKaC/plugins/EPayment/payWay/tpls/ConfModifEPaymentPayWayDataModif.tpl
patch
|
blob
|
history
MaKaC/plugins/EPayment/payWay/webinterface/pages/ePayments.py
patch
|
blob
|
history
MaKaC/webinterface/rh/CFADisplay.py
patch
|
blob
|
history
diff --git
a/MaKaC/plugins/EPayment/payWay/epayment.py
b/MaKaC/plugins/EPayment/payWay/epayment.py
index
0fd4a75
..
5748bd0
100644
(file)
--- a/
MaKaC/plugins/EPayment/payWay/epayment.py
+++ b/
MaKaC/plugins/EPayment/payWay/epayment.py
@@
-35,7
+35,8
@@
class PayWayMod(BaseEPayMod):
self._title = "payway"
self._url="https://pgwtest.ht.hr/services/payment/api/authorize-form"
self._title = "payway"
self._url="https://pgwtest.ht.hr/services/payment/api/authorize-form"
- self._business= "please fill in private key here"
+ self._business="please fill in private key here"
+ self._shopid="please fill in shop id here"
if data is not None:
setValue(data)
if data is not None:
setValue(data)
@@
-55,6
+56,7
@@
class PayWayMod(BaseEPayMod):
self.setTitle(data.get("title", "epayment"))
self.setUrl(data.get("url", ""))
self.setBusiness(data["business"])
self.setTitle(data.get("title", "epayment"))
self.setUrl(data.get("url", ""))
self.setBusiness(data["business"])
+ self.setShopID(data["shopid"])
def getUrl(self):
return self._url
def getUrl(self):
return self._url
@@
-66,6
+68,15
@@
class PayWayMod(BaseEPayMod):
def setBusiness(self,business):
self._business= business
def setBusiness(self,business):
self._business= business
+ def getShopID(self):
+ if hasattr(self, '_shopid'):
+ return self._shopid
+ else:
+ self._shopid = "please fill in shop id"
+ return self._shopid
+ def setShopID(self,shopid):
+ self._shopid= shopid
+
def strip_accents(self,text):
"""
Strip accents from input String.
def strip_accents(self,text):
"""
Strip accents from input String.
@@
-87,9
+98,9
@@
class PayWayMod(BaseEPayMod):
def getFormHTML(self,prix,Currency,conf,registrant,lang = "en_GB", secure=False):
def getFormHTML(self,prix,Currency,conf,registrant,lang = "en_GB", secure=False):
-
pgw_shop_id=str(20000573
)
- pgw_order_id=str(registrant.getId())
- pgw_amount=str(int(prix * 100))
+
pgw_shop_id=str(self._shopid
)
+
pgw_order_id=str(registrant.getId())
+
pgw_amount=str(int(prix * 100))
pgw_success_url=str(localUrlHandlers.UHPayConfirmPayWay.getURL(registrant))
pgw_failure_url=str(localUrlHandlers.UHPayCancelPayWay.getURL(registrant))
pgw_success_url=str(localUrlHandlers.UHPayConfirmPayWay.getURL(registrant))
pgw_failure_url=str(localUrlHandlers.UHPayCancelPayWay.getURL(registrant))
@@
-98,11
+109,11
@@
class PayWayMod(BaseEPayMod):
pgw_first_name=self.strip_accents(registrant.getFirstName())
pgw_last_name=self.strip_accents(registrant.getSurName())
pgw_first_name=self.strip_accents(registrant.getFirstName())
pgw_last_name=self.strip_accents(registrant.getSurName())
- pgw_telephone=registrant.getPhone()
- pgw_email=registrant.getEmail()
+
pgw_telephone=registrant.getPhone()
+
pgw_email=registrant.getEmail()
- secret_key=self.getBusiness()
- pgw_signature= \
+
secret_key=self.getBusiness()
+
pgw_signature= \
'authorize-form' + secret_key + \
pgw_shop_id + secret_key + \
pgw_order_id + secret_key + \
'authorize-form' + secret_key + \
pgw_shop_id + secret_key + \
pgw_order_id + secret_key + \
@@
-116,7
+127,7
@@
pgw_last_name + secret_key + \
pgw_telephone + secret_key + \
pgw_email + secret_key
pgw_telephone + secret_key + \
pgw_email + secret_key
- """
+
"""
gnature = SHA512 (
naziv_metode + secret_key +
pgw_shop_id + secret_key +
gnature = SHA512 (
naziv_metode + secret_key +
pgw_shop_id + secret_key +
@@
-143,7
+154,7
@@
pgw_email + secret_key +
#pgw_merchant_data + secret_key
"""
#pgw_merchant_data + secret_key
"""
- pgw_signature=hashlib.sha512(pgw_signature).hexdigest()
+
pgw_signature=hashlib.sha512(pgw_signature).hexdigest()
s="""<form name="Button" action="%s" method="post" id="%s">
<input type="hidden" name="pgw_shop_id" value="%s" />
s="""<form name="Button" action="%s" method="post" id="%s">
<input type="hidden" name="pgw_shop_id" value="%s" />
@@
-165,10
+176,10
@@
pgw_email + secret_key +
<input type="hidden" name="pgw_signature" value="%s" />
</form>""" % (self.getUrl(), self.getId(), \
<input type="hidden" name="pgw_signature" value="%s" />
</form>""" % (self.getUrl(), self.getId(), \
- pgw_shop_id, pgw_order_id, pgw_amount, \
- pgw_success_url, pgw_failure_url, \
- pgw_first_name, pgw_last_name, pgw_telephone, pgw_email, \
- pgw_signature)
+
pgw_shop_id, pgw_order_id, pgw_amount, \
+
pgw_success_url, pgw_failure_url, \
+
pgw_first_name, pgw_last_name, pgw_telephone, pgw_email, \
+
pgw_signature)
return s
return s
diff --git
a/MaKaC/plugins/EPayment/payWay/tpls/ConfModifEPaymentPayWay.tpl
b/MaKaC/plugins/EPayment/payWay/tpls/ConfModifEPaymentPayWay.tpl
index
42828cc
..
c01b91e
100644
(file)
--- a/
MaKaC/plugins/EPayment/payWay/tpls/ConfModifEPaymentPayWay.tpl
+++ b/
MaKaC/plugins/EPayment/payWay/tpls/ConfModifEPaymentPayWay.tpl
@@
-12,6
+12,10
@@
<td class="dataCaptionTD"><span class="dataCaptionFormat">URL of PayWay</span></td>
<td bgcolor="white" width="100%" class="blacktext"><pre>${ url }</pre></td>
</tr>
<td class="dataCaptionTD"><span class="dataCaptionFormat">URL of PayWay</span></td>
<td bgcolor="white" width="100%" class="blacktext"><pre>${ url }</pre></td>
</tr>
+ <tr>
+ <td class="dataCaptionTD"><span class="dataCaptionFormat">Shop ID</span></td>
+ <td bgcolor="white" width="100%" class="blacktext"><pre>${ shopid }</pre></td>
+ </tr>
<tr>
<td class="dataCaptionTD"><span class="dataCaptionFormat">Private key</span></td>
<td bgcolor="white" width="100%" class="blacktext"><pre>${ business }</pre></td>
<tr>
<td class="dataCaptionTD"><span class="dataCaptionFormat">Private key</span></td>
<td bgcolor="white" width="100%" class="blacktext"><pre>${ business }</pre></td>
diff --git
a/MaKaC/plugins/EPayment/payWay/tpls/ConfModifEPaymentPayWayDataModif.tpl
b/MaKaC/plugins/EPayment/payWay/tpls/ConfModifEPaymentPayWayDataModif.tpl
index
889d6e6
..
f240713
100644
(file)
--- a/
MaKaC/plugins/EPayment/payWay/tpls/ConfModifEPaymentPayWayDataModif.tpl
+++ b/
MaKaC/plugins/EPayment/payWay/tpls/ConfModifEPaymentPayWayDataModif.tpl
@@
-11,6
+11,10
@@
<td class="dataCaptionTD"><span class="dataCaptionFormat">URL of PayWay</span></td>
<td align="left"><input type="text" name="url" size="60" value="${ url }"></td>
</tr>
<td class="dataCaptionTD"><span class="dataCaptionFormat">URL of PayWay</span></td>
<td align="left"><input type="text" name="url" size="60" value="${ url }"></td>
</tr>
+ <tr>
+ <td class="dataCaptionTD"><span class="dataCaptionFormat">Shop ID</span></td>
+ <td align="left"><input type="text" name="shopid" size="60" value="${ shopid }"></td>
+ </tr>
<tr>
<td class="dataCaptionTD"><span class="dataCaptionFormat">Private key</span></td>
<td align="left"><input type="text" name="business" size="60" value="${ business }"></td>
<tr>
<td class="dataCaptionTD"><span class="dataCaptionFormat">Private key</span></td>
<td align="left"><input type="text" name="business" size="60" value="${ business }"></td>
diff --git
a/MaKaC/plugins/EPayment/payWay/webinterface/pages/ePayments.py
b/MaKaC/plugins/EPayment/payWay/webinterface/pages/ePayments.py
index
379142d
..
eea714d
100644
(file)
--- a/
MaKaC/plugins/EPayment/payWay/webinterface/pages/ePayments.py
+++ b/
MaKaC/plugins/EPayment/payWay/webinterface/pages/ePayments.py
@@
-79,6
+79,7
@@
class WConfModifEPaymentPayWay( WTemplated ):
vars["title"] = modPayWay.getTitle()
vars["url"] = modPayWay.getUrl()
vars["business"] = modPayWay.getBusiness()
vars["title"] = modPayWay.getTitle()
vars["url"] = modPayWay.getUrl()
vars["business"] = modPayWay.getBusiness()
+ vars["shopid"] = modPayWay.getShopID()
return vars
class WPConfModifEPaymentPayWayDataModif( WPConfModifEPaymentPayWayBase ):
return vars
class WPConfModifEPaymentPayWayDataModif( WPConfModifEPaymentPayWayBase ):
@@
-100,6
+101,7
@@
class WConfModifEPaymentPayWayDataModif( WTemplated ):
vars["title"] = modPayWay.getTitle()
vars["url"] = modPayWay.getUrl()
vars["business"] = modPayWay.getBusiness()
vars["title"] = modPayWay.getTitle()
vars["url"] = modPayWay.getUrl()
vars["business"] = modPayWay.getBusiness()
+ vars["shopid"] = modPayWay.getShopID()
return vars
class WPconfirmEPaymentPayWay( conferences.WPConferenceDefaultDisplayBase ):
return vars
class WPconfirmEPaymentPayWay( conferences.WPConferenceDefaultDisplayBase ):
diff --git
a/MaKaC/webinterface/rh/CFADisplay.py
b/MaKaC/webinterface/rh/CFADisplay.py
index
844a7b8
..
a92750d
100644
(file)
--- a/
MaKaC/webinterface/rh/CFADisplay.py
+++ b/
MaKaC/webinterface/rh/CFADisplay.py
@@
-147,7
+147,7
@@
class _AbstractSubmissionNotification:
tw = TextWrapper()
msg = [i18nformat("""_("Dear") %s,""") % self._abstract.getSubmitter().getStraightFullName()]
msg.append("")
tw = TextWrapper()
msg = [i18nformat("""_("Dear") %s,""") % self._abstract.getSubmitter().getStraightFullName()]
msg.append("")
- msg.append(tw.fill(_("The submission of your abstract has been successfully processed
.
")))
+ msg.append(tw.fill(_("The submission of your abstract has been successfully processed
!
")))
msg.append("")
tw.break_long_words = False
msg.append(tw.fill(i18nformat("""_("Abstract submitted"):\n<%s>.""") % urlHandlers.UHUserAbstracts.getURL(self._conf)))
msg.append("")
tw.break_long_words = False
msg.append(tw.fill(i18nformat("""_("Abstract submitted"):\n<%s>.""") % urlHandlers.UHUserAbstracts.getURL(self._conf)))