Skip to content

Commit

Permalink
Migrate Cowpay to v2 - EDLY-5604 (#129)
Browse files Browse the repository at this point in the history
Co-authored-by: Taimoor  Ahmed <taimoor.ahmed@A006-00933.local>
  • Loading branch information
taimoor-ahmed-1 and Taimoor Ahmed authored Jun 13, 2023
1 parent 7b307ce commit 29cc68d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ecommerce/extensions/payment/processors/cowpay.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def fawry_form(self):

@property
def iframe_token(self):
cowpay_url = urljoin(self.base_url, '/api/v1/iframe/token')
cowpay_url = urljoin(self.base_url, '/api/v2/iframe/token')
headers = self._get_request_header()
basket = self.request.basket
payload = self._get_request_payload(
Expand All @@ -104,7 +104,7 @@ def receipt_page_url(self):
return get_receipt_page_url(site.siteconfiguration, order_number=basket.order_number)

def get_transaction_parameters(self, basket, request=None, **kwargs):
cowpay_url = urljoin(self.base_url, '/api/v1/charge/fawry')
cowpay_url = urljoin(self.base_url, '/api/v2/charge/fawry')
headers = self._get_request_header()
data = kwargs.get('form_data')
if data:
Expand Down
2 changes: 1 addition & 1 deletion ecommerce/templates/payment/cowpay.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load static %}

<script src="{{ client_side_payment_processor.base_url }}/js/plugins/CCIframePlugin.js"></script>
<script src="{{ client_side_payment_processor.base_url }}/js/plugins/OTPPaymentPlugin.js"></script>
<script src="{{ client_side_payment_processor.base_url }}/js/plugins/CardPlugin.js"></script>
<script type="text/javascript">
window.CowpayConfig = {
postUrl: "{% url 'cowpay:submit' %}",
Expand Down

0 comments on commit 29cc68d

Please sign in to comment.