Commit 3c7cba87 authored by Ulises Morales Ramírez's avatar Ulises Morales Ramírez

Merge branch 'ipn_paypal' into 'dev'

IPN

See merge request !8
parents da21ffcc 1304ce86
...@@ -14,7 +14,7 @@ import os ...@@ -14,7 +14,7 @@ import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BASE_URL = "localhost:8000"
# Quick-start development settings - unsuitable for production # Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
......
...@@ -201,10 +201,10 @@ ...@@ -201,10 +201,10 @@
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td> <!--td>
<a href="../pay" class="btn btn-primary pull-right">Pay</a> <a href="../pay" class="btn btn-primary pull-right">Pay</a>
</td> </td-->
<td> <td class="text-center">
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1"> <input type="hidden" name="upload" value="1">
...@@ -222,9 +222,10 @@ ...@@ -222,9 +222,10 @@
{% endfor %} {% endfor %}
<input type='hidden' name='cancel_return' <input type='hidden' name='cancel_return'
value='http://www.example.com/cancel.php'> value='{{BASE_URL}}/reports'>
<input type='hidden' name='return' <input type='hidden' name='return'
value='http://www.example.com/success.php'> value='{{BASE_URL}}/catalog/cart'>
<input type="hidden" name="notify_url" value="{{BASE_URL}}/catalog/ipn">
<input type="image" <input type="image"
src="https://www.sandbox.paypal.com/es_XC/MX/i/btn/btn_buynowCC_LG.gif" src="https://www.sandbox.paypal.com/es_XC/MX/i/btn/btn_buynowCC_LG.gif"
border="0" name="submit" border="0" name="submit"
......
...@@ -15,4 +15,5 @@ urlpatterns = [ ...@@ -15,4 +15,5 @@ urlpatterns = [
url(r'^purchcartrqst/$', views.purchaseProduct, name='purch-prod-rqst'), url(r'^purchcartrqst/$', views.purchaseProduct, name='purch-prod-rqst'),
url(r'^cart/$', views.showCart, name='show-cart'), url(r'^cart/$', views.showCart, name='show-cart'),
url(r'^pay/$', views.Pay, name='pay'), url(r'^pay/$', views.Pay, name='pay'),
url(r'^ipn/$', views.IPN, name='ipn'),
] ]
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment