Permalink
Browse files

Debuggins payment process

  • Loading branch information...
1 parent c7d5879 commit 737d956fa4cfe10ccbd47d1bfa360a22edcab031 @nka11 nka11 committed Apr 3, 2012
Showing with 8 additions and 6 deletions.
  1. +2 −0 core/HardItem.py
  2. +2 −2 core/Store.py
  3. +4 −4 resources/templates/default/fragments/get_shopping_cart.jst
View
@@ -124,6 +124,8 @@ def _do_cart_validation(self,cart):
"""
if 'shipping_adr' not in cart:
return (False, "shipping")
+ else:
+ return (True,"valid")
# Number of this item odered
#cart_number = cart['items'][self.id]
#self.__bo_node__._reserve_item(self, cart)
View
@@ -514,12 +514,12 @@ def validate_cart(self):
result,type = cart._do_self_validation()
self._get_backoffice_node()._validate_cart(cart)
if result:
- return {'status':'success','data':cart,'datatype':'ShoppingCart', 'success':True}
+ return {'status':'success','data':cart._get_cart_array(),'datatype':'ShoppingCart', 'success':True}
else:
return {'message':"cart not validated, %s is missing" % type, 'type': type, 'success':False}
except:
- return {'success': False, 'error':'Cart not validated', 'errorData': sys.exc_info()}
+ return {'success': False, 'error':'Cart not validated', 'errorData': traceback.format_exc()}
def _set_services_form(self):
result = None
@@ -93,16 +93,16 @@ session = karacos.serving.get_session() %>
<tr><td colspan="4" style="text-align:right">Total TTC</td><td class="store_cart_total_ttc">{cart_total}</td></tr>
</tbody>
</table>
- <% services = store._get_services() %>
- % if 'paypay_express' in services['message']:
+ <% services = store.__get_services__() %>
+ % if 'paypay_express' in services:
<div class="pay_button" typeof="karacos:method"
about="urn:uuid:k-meche_store_paypal_button:pay_cart" style="display:none;">
<div style="display:none;" property="url">{store_url}</div>
<div style="display:none;" property="service">paypal_express</div>
<img src="/_server/k-meche/images/EC-button.gif"/></div>
%endif
- % if 'paybox' in services['message']:
- <div class="pay_button" typeof="karacos:method"
+ % if 'paybox' in services:
+ <div class="pay_button" typeof="karacos:method"
about="urn:uuid:k-meche_store_paybox_button:pay_cart" style="display:none;">
<div style="display:none;" property="url">{store_url}</div>
<div style="display:none;" property="service">paybox</div>

0 comments on commit 737d956

Please sign in to comment.