fd71c60dab1fd5d680ea58b47189ab803da1d3d1,apps/profile/views.py,,paypal_form,#,80

Before Change



@ajax_login_required
def paypal_form(request):
    paypal_dict = {
        "cmd": "_xclick-subscriptions",
        // "business": "samuel@ofbrooklyn.com",
        "business": "samuel_1287279745_biz@conesus.com",
        "a3": "12.00",                     // price 
        "p3": 1,                           // duration of each unit (depends on unit)
        "t3": "Y",                         // duration unit ("M for Month")
        "src": "1",                        // make payments recur
        "sra": "1",                        // reattempt payment on payment error
        "no_note": "1",                    // remove extra notes (optional)
        "item_name": "NewsBlur Premium Account",
        "notify_url": reverse("paypal-ipn"),
        "return_url": reverse("paypal-return"),
        "cancel_return": reverse("index"),
        "custom": request.user.username,
    }

    // Create the instance.
    form = PayPalPaymentsForm(initial=paypal_dict, button_type="subscribe")

    // Output the button.
    return HttpResponse(form.sandbox(), mimetype="text/html")

After Change



@ajax_login_required
def paypal_form(request):
    domain = Site.objects.get_current().domain
    
    paypal_dict = {
        "cmd": "_xclick-subscriptions",
        // "business": "samuel@ofbrooklyn.com",
        "business": "samuel_1287279745_biz@conesus.com",
        "a3": "12.00",                     // price 
        "p3": 1,                           // duration of each unit (depends on unit)
        "t3": "Y",                         // duration unit ("M for Month")
        "src": "1",                        // make payments recur
        "sra": "1",                        // reattempt payment on payment error
        "no_note": "1",                    // remove extra notes (optional)
        "item_name": "NewsBlur Premium Account",
        "notify_url": "http://%s%s" % (domain, reverse("paypal-ipn")),
        "return_url": "http://%s%s" % (domain, reverse("paypal-return")),
        "cancel_return": "http://%s%s" % (domain, reverse("index")),
        "custom": request.user.username,
    }

    // Create the instance.
    form = PayPalPaymentsForm(initial=paypal_dict, button_type="subscribe")

    // Output the button.
    return HttpResponse(form.sandbox(), mimetype="text/html")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: samuelclay/NewsBlur
Commit Name: fd71c60dab1fd5d680ea58b47189ab803da1d3d1
Time: 2010-10-23
Author: samuel@ofbrooklyn.com
File Name: apps/profile/views.py
Class Name:
Method Name: paypal_form


Project Name: samuelclay/NewsBlur
Commit Name: fd71c60dab1fd5d680ea58b47189ab803da1d3d1
Time: 2010-10-23
Author: samuel@ofbrooklyn.com
File Name: apps/profile/views.py
Class Name:
Method Name: paypal_form