I am using django-meerchant for paypal payment http://readthedocs.org/docs/django-merchant/en/latest/offsite/paypal.html ...
and my views have this code :
pay_pal = get_integration("pay_pal")
pay_pal.add_fields({
"business": client.paypal_id,
"item_name": product.name,
"invoice": inst.trans_code,
"notify_url": settings.BASE_DNS + str(client.id) + '/book/'+str(inst.id) +'/success/?booksaved=1',
"return_url": settings.BASE_DNS + str(client.id) + '/book/'+str(inst.id) +'/success/?booksaved=1',
"cancel_return": settings.BASE_DNS + str(client.id) + '/?booksaved=0',
"amount": inst.book_charged})
return render_to_response("pay_pay.html", {"obj": pay_pal, "product": product.name, "amount": inst.totalcost},context_instance=RequestContext(request))
my template pay_pay.html
{% extends "main_base_bookingpage.html" %}
{% load billing_tags %}
{% block content %}
Required Parameters from the view
<ul>
<li> item_name : {{ product }}</li>
<li> amount : {{ amount }}</li>
</ul>
{% paypal obj %}
{% endblock %}
my question is how can i change it so that it will change to the paypal site and not to sandbox.paypal site?
thanks in advance...
According to the docs you could either specify test_mode parameter when calling get_integration
(pay_pal = get_integration("pay_pal", test_mode=False)
), or set MERCHANT_TEST_MODE in settings file. Also you may need to change PAYPAL_TEST
setting too.
PS. I don't work with django-merchant and don't know whether this will work, this is just assumptions from the docs.