-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implement PayFort Payment Processor
- Loading branch information
Showing
16 changed files
with
688 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{% extends "edx/base.html" %} | ||
{% load i18n %} | ||
|
||
{% block content %} | ||
<style> | ||
.centered-content { | ||
text-align: center; | ||
margin-top: 2em; | ||
} | ||
</style> | ||
<div class="centered-content"> | ||
<h1>{% trans "Redirecting to the Payment Gateway..." %}</h1> | ||
</div> | ||
|
||
<form action="https://sbcheckout.payfort.com/FortAPI/paymentPage" method="post" name="payment_form"> | ||
<input type="hidden" name="command" value={{ command }}> | ||
<input type="hidden" name="access_code" value="{{ access_code }}"> | ||
<input type="hidden" name="merchant_identifier" value="{{ merchant_identifier }}"> | ||
<input type="hidden" name="merchant_reference" value="{{ merchant_reference }}"> | ||
<input type="hidden" name="amount" value="{{ amount }}"> | ||
<input type="hidden" name="currency" value="{{ currency }}"> | ||
<input type="hidden" name="language" value="{{ language }}"> | ||
<input type="hidden" name="customer_email" value="{{ customer_email }}"> | ||
<input type="hidden" name="order_description" value="{{ order_description }}"> | ||
<input type="hidden" name="signature" value="{{ signature }}"> | ||
<input type="hidden" name="customer_name" value="{{ customer_name }}"> | ||
<input type="hidden" name="return_url" value="{{ return_url }}"> | ||
</form> | ||
{% endblock %} | ||
|
||
{% block javascript %} | ||
<script type="text/javascript"> | ||
window.onload = function() { | ||
document.payment_form.submit(); | ||
}; | ||
</script> | ||
{% endblock %} |
23 changes: 23 additions & 0 deletions
23
ecommerce_payfort/templates/payment/payment_handle_format_error.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% extends "edx/base.html" %} | ||
{% load i18n %} | ||
|
||
{% block content %} | ||
<style> | ||
.centered-content { | ||
text-align: center; | ||
margin-top: 2em; | ||
} | ||
</style> | ||
<div class="centered-content"> | ||
<h1>{% trans "This is unfortunate and not expected!" %}</h1> | ||
|
||
<p>{% trans "The response came from the payment gateway is malformed but flagged as succeeded! We're are not sure if your account has been charged or not! The administrator has been notified and will investigate the issue shortly" %}</p> | ||
|
||
<p><strong>{% trans "Please do not submit a purchase again before contacting the administrator" %}</strong></p> | ||
|
||
{% if reference != "none" %} | ||
<p>{% trans "For your reference, the payment ID is:" %} <strong>{{ reference }}</strong></p> | ||
{% endif %} | ||
</div> | ||
|
||
{% endblock %} |
21 changes: 21 additions & 0 deletions
21
ecommerce_payfort/templates/payment/payment_handle_internal_error.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{% extends "edx/base.html" %} | ||
{% load i18n %} | ||
|
||
{% block content %} | ||
<style> | ||
.centered-content { | ||
text-align: center; | ||
margin-top: 2em; | ||
} | ||
</style> | ||
<div class="centered-content"> | ||
<h1>{% trans "This is unfortunate and not expected!" %}</h1> | ||
|
||
<p>{% trans "The payment has been processed successfully, but we had an unexpected error while submitting the payment information to the server. The administrator has been notified and will investigate the issue." %}</p> | ||
|
||
<p><strong>{% trans "Please do not submit a purchase again before contacting the administrator" %}</strong></p> | ||
|
||
<p>{% trans "For your reference, the payment ID is:" %} <strong>{{ merchant_reference }}</strong></p> | ||
</div> | ||
|
||
{% endblock %} |
Oops, something went wrong.