Search Results

Search found 4109 results on 165 pages for 'django paypal'.

Page 19/165 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Django: TypeError: 'str' object is not callable, referer: http://xxx

    - by user705415
    I've been wondering why when I set the settings.py of my django project 'arvindemo' debug = Flase and deploy it on Apache with mod_wsgi, I got the 500 Internal Server Error. Env: Django 1.4.0 Python 2.7.2 mod_wsgi 2.8 OS centOS Here is the recap: Visit the homepage, go to sub page A/B/C/D, and fill some forms, then submit it to the Apache server. Once click 'submit' button, I will get the '500 Internal Server Error', and the error_log listed below(Traceback): [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] Traceback (most recent call last): [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] File "/opt/python2.7/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 241, in __call__ [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] response = self.get_response(request) [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] File "/opt/python2.7/lib/python2.7/site-packages/django/core/handlers/base.py", line 179, in get_response [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] File "/opt/python2.7/lib/python2.7/site-packages/django/core/handlers/base.py", line 224, in handle_uncaught_exception [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] if resolver.urlconf_module is None: [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] File "/opt/python2.7/lib/python2.7/site-packages/django/core/urlresolvers.py", line 323, in urlconf_module [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] self._urlconf_module = import_module(self.urlconf_name) [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] File "/opt/python2.7/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] __import__(name) [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] File "/opt/web/django/arvindemo/arvindemo/../arvindemo/urls.py", line 23, in <module> [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] url(r'^submitPage$', name=submitPage), [Tue Apr 10 10:07:20 2012] [error] [client 122.198.133.250] TypeError: url() takes at least 2 arguments (2 given) When using django runserver, I set arvindemo.settings debug = True, everything is OK. But things changed once I set debug = Flase. Here is my views.py from django.http import HttpResponseRedirect from django.http import HttpResponse, HttpResponseServerError from django.shortcuts import render_to_response import datetime, string from user_info.models import * from django.template import Context, loader, RequestContext import settings def hello(request): return HttpResponse("hello girl") def helpPage(request): return render_to_response('kktHelp.html') def server_error(request, template_name='500.html'): return render_to_response(template_name, context_instance = RequestContext(request) ) def page404(request): return render_to_response('404.html') def submitPage(request): post = request.POST Mall = 'goodsName' Contest = 'ojs' Presentation = 'addr' WeatherReport = 'city' Habit = 'task' if Mall in post: return submitMall(request) elif Contest in post: return submitContest(request) elif Presentation in post: return submitPresentation(request) elif Habit in post: return submitHabit(request) elif WeatherReport in post: return submitWeather(request) else: return HttpResponse(request.POST) return HttpResponseRedirect('404') def submitXXX(): ..... def xxxx(): .... Here comes the urls.py from django.conf.urls import patterns, include, url from views import * from django.conf import settings handler500 = 'server_error' urlpatterns = patterns('', url(r'^hello/$', hello), # hello world url(r'^$', homePage), url(r'^time/$', getTime), url(r'^time/plus/(\d{1,2})/$', hoursAhead), url(r'^Ttime/$', templateGetTime), url(r'^Mall$', templateMall), url(r'^Contest$', templateContest), url(r'^Presentation$', templatePresentation), url(r'^Habit$', templateHabit), url(r'^Weather$', templateWeather), url(r'^Help$', helpPage), url(r'^404$', page404), url(r'^500$', server_error), url(r'^submitPage$', submitPage), url(r'^submitMall$', submitMall), url(r'^submitContest$', submitContest), url(r'^submitPresentation$', submitPresentation), url(r'^submitHabit$', submitHabit), url(r'^submitWeather$', submitWeather), url(r'^terms$', terms), url(r'^privacy$', privacy), url(r'^thanks$', thanks), url(r'^about$', about), url(r'^static/(?P<path>.*)$','django.views.static.serve',{'document_root':settings.STATICFILES_DIRS}), ) I'm sure there is no syntax error in my django project,cause when I use django runserver, everything is fine. Anyone can help ? Best regards

    Read the article

  • How can I handle dynamic calculated attributes in a model in Django?

    - by bullfish
    In Django I calculate the breadcrumb (a list of fathers) for an geographical object. Since it is not going to change very often, I am thinking of pre calculating it once the object is saved or initialized. 1.) What would be better? Which solution would have a better performance? To calculate it at _init_ or to calculate it when the object is saved (the object takes about 500-2000 characters in the DB)? 2.) I tried to overwrite the _init_ or save() methods but I don't know how to use attributes of the just saved object. Accessing *args, **kwargs did not work. How can I access them? Do I have to save, access the father and then save again? 3.) If I decide to save the breadcrumb. Whats the best way to do it? I used http://www.djangosnippets.org/snippets/1694/ and have crumb = PickledObjectField(). Thats the method to calculate the attribute crumb() def _breadcrumb(self): breadcrumb = [ ] x = self while True: x = x.father try: if hasattr(x, 'country'): breadcrumb.append(x.country) elif hasattr(x, 'region'): breadcrumb.append(x.region) elif hasattr(x, 'city'): breadcrumb.append(x.city) else: break except: break breadcrumb.reverse() return breadcrumb Thats my save-Method: def save(self,*args, **kwargs): # how can I access the father ob the object? father = self.father # does obviously not work father = kwargs['father'] # does not work either # the breadcrumb gets calculated here self.crumb = self._breadcrumb(father) super(GeoObject, self).save(*args,**kwargs) Please help me out. I am working on this for days now. Thank you.

    Read the article

  • How to render a POST and make it show up on another page

    - by stack5914
    I'm trying to create a marketplace website similar to craigslist. I created a form according to the Django tutorial "Working with forms", but I don't know how to render information I got from the POST forms. I want to make information(subject,price...etc) that I got from POST show up on another page like this. http://bakersfield.craigslist.org/atq/3375938126.html and, I want the "Subject"(please look at form.py) of this product(eg.1960 French Chair) to show up on another page like this. http://bakersfield.craigslist.org/ata/ } Can I get some advice to handle submitted information? Here's present codes. I'll appreciate all your answers and helps. <-! Here's my codes -- ?forms.py from django import forms class SellForm(forms.Form): subject = forms.CharField(max_length=100) price = forms.CharField(max_length=100) condition = forms.CharField(max_length=100) email = forms.EmailField() body = forms.TextField() ?views.py from django.shortcuts import render, render_to_response from django.http import HttpResponseRedirect from site1.forms import SellForm def sell(request): if request.method =="POST": form =SellForm(request.POST) if form.is_valid(): subject = form.cleaned_data['subject'] price = form.cleaned_data['price'] condition = form.cleaned_data['condition'] email = form.cleaned_data['email'] body = form.cleaned_data['body'] return HttpResponseRedirect('/books/') else: form=SellForm() render(request, 'sell.html',{'form':form,}) ?urls.py from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^sechand/$','site1.views.sell'), url(r'^admin/', include(admin.site.urls)), ) ?sell.html <form action = "/sell/" method = "post">{% csrf_token%} {{ form.as_p }} <input type = "submit" value="Submit" /> </form>

    Read the article

  • How to stop Django from adding extra html elements to rendered widgets.

    - by stinkypyper
    I have a Django radio button group that renders to HTML as follows: <ul> <li><label for="id_package_id_0"><input type="radio" id="id_package_id_0" value="1" name="package_id" /> Test 256</label></li> <li><label for="id_package_id_1"><input type="radio" id="id_package_id_1" value="2" name="package_id" /> Test 384</label></li> <li><label for="id_package_id_2"><input type="radio" id="id_package_id_2" value="3" name="package_id" /> Test 512</label></li> <li><label for="id_package_id_3"><input type="radio" id="id_package_id_3" value="4" name="package_id" /> Test 768</label></li> <li><label for="id_package_id_4"><input type="radio" id="id_package_id_4" value="5" name="package_id" /> Test 1024</label></li> </ul> I need it to render without being a list. I am a aware of form.as_p, form.as_table, and form.as_ul. They will not help me as they continue to add extra HTML tags. As well, I am not using the form object in it's absolute entirety, just for validation. I am doing a custom template for the form already, but wish to continue to the radio widget.

    Read the article

  • Passing a custom variable to the PayPal API

    - by Michael
    Gday All, I am developing a site that uses PayPal to take online payments. I need to be able to send my client an email with the link to PayPal in order to pay. In this link I need a way to set a unique value (for example bookingId) that I can use to add the receipt number to the correct booking via PayPal's payment notification feature. Does anyone know what custom value I can set in order to achieve this? Cheers, Michael

    Read the article

  • Zen Cart - Get Line items in Paypal?

    - by kylex
    Is there anyway to guarantee line items be displayed in PayPal instead of the very generic description for all items combined? For example, if someone orders 3 items with the total of $100.00, paypal shows one item with "Items Purchased" as the description and the total cost. I'd like an itemized list. Often I need to view the items in Paypal and just need to know if this is possible and how to set it up.

    Read the article

  • "You have requested an outdated version of PayPal"

    - by porton
    When I being logged it in PayPal follow this link: https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_xclick;business=porton_1349611651_biz%40narod.ru;quantity=;item_name=Points;undefined_quantity=1;currency_code=ILS;no_shipping=1;no_note=1;return=http%3A%2F%2Fseostart.co.il%2Fcgi-bin%2Fuser%2Fhome.pl;cancel_return=http%3A%2F%2Fseostart.co.il%2Fcgi-bin%2Fuser%2Fhome.pl;notify_url=http%3A%2F%2Fseostart.co.il%2Fcgi-bin%2Fpaypal%2Fpaypal-notify.pl;custom=user%3D1&invoice=23 I receive message: You have requested an outdated version of PayPal. This error often results from the use of bookmarks. What is the error?

    Read the article

  • PayPal: IPN vs PDT

    - by Tom
    Hi, I'm having some trouble choosing between PayPal's Instant Payment Notification (IPN) and Payment Data Transfer (PDT). Basically, users buy a one-off product on my site, pay on PayPal, and return to my site. I understand how IPN works but I'm now seeing that I might be able to trigger the various actions that take place after a successful purchase more easily with PDT, as the data gets returned there and then (as opposed to needing a separate listener). However, PayPal's PDT documentation contains this cryptic line: "PDT is not meant to be used with credit card or Express Checkout transactions." ... but I can't find anything further whatsoever on the topic. (1) Are credit cards REALLY not meant to be used with PDT? I would like more than a sentence. (2) Does that mean that a user must have/create a PayPal account to pay? (3) Does it mean that if I want to allow users to pay with their PayPal accounts AND/OR with credit cards directly, I must implement IPN? Could anyone who's gone through this kindly shed some light? Thank you.

    Read the article

  • PayPal integration with magento

    - by Alloi
    Hi, I am new to paypal and magento. I have a buiness account created on paypal and have a magento installation Now I need to integrate the paypal account on to this magento. How do i do this exactly. I tried to go through tutorials but no soap. Can some kindly help me out here with the process. Thanks in advance Alloi

    Read the article

  • Magento - Paypal Express 404 Error

    - by a1anm
    I have added paypal pro (uk) express to my Magento shopping cart. The paypal button now appears below the checkout button in the shopping cart. The problem is when I click the paypal button I get a 404 error. Any ideas?

    Read the article

  • PayPal return URL

    - by Sam
    Here's the code for my Paypal button: <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="[email protected]"> <input type="hidden" name="lc" value="GB"> <input type="hidden" name="button_subtype" value="products"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="rm" value="0"> <input type="hidden" name="return" value="http://www.example.com"> <input type="hidden" name="item_name" value="My Item"> <input type="hidden" name="amount" value="25.00"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="bn" value="PP-BuyNowBF:proceed_btn.gif:NonHosted"> <input type="hidden" name="item_number" value="4BD9569402CDE"> <input type="image" src="http://www.example.com/image.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online."> <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1"> </form> Is it possible to add the item_number to the return URL? For example, after completing the payment within PayPal the user gets sent back to http://www.example.com?item_number=4BD9569402CDE

    Read the article

  • Guidance related to Paypal Integration Using Codeigniter

    - by anum
    I need some guidance related to Paypal Integration. Its not similar to regular cart. After checkout, the site offers a form for payment option, either its paypal or some other payment process. The form directs to controller after submit. A array exists which contains all items value, from here on how can I proceed to paypal site. How can I do this?

    Read the article

  • ASP.NET MVC: Complete action before posting to Paypal

    - by ajbeaven
    I'm in the middle of developing an e-commerce site that is using Paypal as it's payment gateway. All I want to do is run some code before the user heads off to Paypal, but I have no idea how to do it. Eg: [AcceptVerbs(HttpVerbs.Post)] public ActionResult GoToPaypal(FormCollection collection) { //do what I want to do //go to paypal } Can you do this? Example HTML and C# would be lovely :)

    Read the article

  • iPhone Application And PayPal

    - by SK
    I want to integrate PayPal payment facility into my native iPhone application without using web interface so user does not have to leave from the current application. How can it be possible ? Should I use SOAP XML request/response mechanism? I come through following link http://www.slideshare.net/paypalx/learn-how-to-use-paypal-api-to-monetize-your-mobile-app. It contains In application Mobile Checkout via Mobile Web slide that represents the sample UI to access PayPal but how can I implement the same thing? Is it legal to use PayPal to deliver virtiual goods/Application Functionality or Apple can reject this ? Thanks.

    Read the article

  • ASP.NET MVC: Triggering an action before posting to Paypal payment gateway

    - by ajbeaven
    I'm in the middle of developing an e-commerce site that is using Paypal as it's payment gateway. All I want to do is run some code before the user heads off to Paypal to pay for their order, but I have no idea how to do it. The user should click a submit button, changes are made (in this case, the status of the order), and then the user is redirected to the payment gateway. Eg: [AcceptVerbs(HttpVerbs.Post)] public ActionResult GoToPaypal(FormCollection collection) { //change order status //send user to paypal where they pay for their order } So my question is how do you do application stuff and then redirect to paypal's payment gateway? Example HTML and C# would be lovely :)

    Read the article

  • Building a complete online payment gateway like Paypal

    - by John Stewart
    So this question isn't about integrating an existing payment gateway into my site. This is more of a architectural question. I want to build a system similar to Paypal. Now I understand that Paypal offers a lot of features under the roof and I can't implement all of them at once. I want to implement the core functionality of Paypal and other such services. So my question is (rather discussion is) around how would one go about building such a system. Some points to discuss: Handle payments through existing banks. I am guessing that I would need access to local bank protocols to get this. Allow users to securely store and process their payments How does Paypal handle the transactions? Thoughts?

    Read the article

  • Paypal Encrypted Website payments

    - by John Isaacks
    I am trying to integrate a PayPal Website Payments Standard Cart Upload payment type into my shopping cart. I integrated Google Checkout a while back and I did not find it overly confusing as I do paypal. I am getting info on how to encrypt it from here: https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/e_howto_html_encryptedwebpayments#id08A3I0P017Q Paypal says I need to generate a private key and a public certificate using OpenSSL. I went to OpenSSL and downloaded the latest release, which is just a folder containing various files but I see no application I can use, not sure what to do here. Even if I were to get OpenSSL to generate me a private key and public cert, the next step is to download either an MS or Java command line tool to create the encrypted cart ahead of time with the cart-total, tax, etc. which sounds crazy to me, like I am supposed to manually do this prior to every order?? Obviously I do not know the items in the cart the customer is going to buy before hand so I need this to be done on the fly on my website using PHP. But I am completely lost. There has to be a way to setup dynamic secure cart uploads to paypal. Can someone please point me in the right direction?

    Read the article

  • How to deny payment via PayPal IPN?

    - by Nick
    Hello all, I need to create dynamic 'Pay Now' buttons on my site, and PayPal says the way to do this is via an HTML FORM with preset variables for the price, currency, and item of the purchase. I use PayPal IPN to notify me when a payment has complete. However, what's to stop someone from modifying the query parameters of the Pay Now button to change the price? Some people have told me to redirect the button through a PHP file that sends you to a PayPal payment page with the parameters in place, but the price could just as easily be manipulated in the Web browser's address bar. My question is, how can I deny a payment if the information I receive from PayPal's IPN service is invalid (if the price doesn't match our records)? I'm quite confused and couldn't find any documentation on what I'm looking for. Hopefully, you guys can help. Thanks!

    Read the article

  • how to insert a verify code HTML Standard Paypal

    - by user304828
    i have a product , product infor was save in table , and have a field verify_code, i will create a string by md5 and insert to this field, and i want send this verify_code to paypal then i can check response return from paypal if verify_code == response verify_code will do next action how i can do it with html standard paypal?

    Read the article

  • PAYPAL IPN Response Problem

    - by Gorkem Tolan
    I am having a problem with Paypal IPN response. After payment is made by the customer, paypal ipn returns this url www.mywebsite.com?orderid=32&tx=2AC67201DL3533325&st=Pending&amt=2.50&cc=USD&cm=&item_number=32 There are a couple of issues 1- Postback field names are undefined or missing. Thus I can get the INVALID message. I am not sure if my website does not read POST variables. When I looked at IPN history, it shows that each IPN has been sent with the complete url. 2- Payment status keeps coming Pending. Does this issue cause the first issue? Thank you for your responses in advance. Here is the code: Dim strSandbox As String, strLive As String Dim req As HttpWebRequest strSandbox = "http://www.sandbox.paypal.com/cgi-bin/webscr/" strLive = "https://www.paypal.com/cgi-bin/webscr" req = CType(WebRequest.Create(strSandbox), HttpWebRequest) 'Set values for the request back req.Method = "POST" req.ContentType = "application/x-www-form-urlencoded" Dim param() As Byte param = Request.BinaryRead(HttpContext.Current.Request.ContentLength) Dim strRequest As String strRequest = Encoding.ASCII.GetString(param) strRequest = strRequest & "&cmd=_notify-validate" req.ContentLength = strRequest.Length 'Response.Write(strRequest) 'Send the request to PayPal and get the response Dim streamOut As StreamWriter streamOut = New StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII) streamOut.Write(strRequest) streamOut.Close() Dim streamIn As StreamReader streamIn = New StreamReader(req.GetResponse().GetResponseStream()) Dim strResponse As String strResponse = streamIn.ReadToEnd() Response.Write(strResponse) streamIn.Close() If (strResponse = "VERIFIED") Then Response.Redirect("thankyou.aspx") ElseIf (strResponse = "INVALID") Then End If

    Read the article

  • How to integrate a PHP CMS with paypal so that only users who completed a payment can register and authenticate?

    - by ibiza
    I am currently using a PHP CMS - cmsmadesimple - in order to create a website where services will be sold. I intend to use Paypal 'Buy Now' buttons in order to offer a few packages that will be renewable every 1-month or every 3-months and that grant access to the secure content of the website for a given period of time. Everything is going well so far but I am somewhat at loss for the user registration process as I have a few constraints I would like to use and it would be nice to automate the process if possible. Here are the constraints : User should be able to register to my website and choose a password himself Only users that paid should be able to register Access permissions should be disabled automatically after the service period if the package is not renewed And here is the process which I am thinking of : User clicks 'buy' on my website User is redirected on Paypal and completes the payment The paypal email used to pay should be returned to my server and somehow stored If it is a new email, user needs to register to my website (else if it is a returning customer, the deactivation flag for payment stopped should be removed to give back access) If a user does not renew his subscription, there should be a deactivation flag automatically set to the email used in order to lock access until next payment. Ideally, no human intervention is needed. What is the best way to implement all this? I am a bit at loss. I found this article that explained a few things and even has a nice code snippet, except that I'm not sure where to plug it. Thanks all

    Read the article

  • Is there a mode for different Paypal IPN?

    - by Doug
    I have a donation script at this moment where the user inputs the donation amount on the Paypal website. The problem with this is that some people donate $0.30 which equates to $0 after Paypal fees. I want to put first check the amount donated using an input on my website and then send off the amount to the Paypal website where they can continue to enter their credit card information and what not. How do I do this? Do I have to change to another mode? or am I supposed to send the amount to Paypal and then they'll know how it's handled?

    Read the article

  • Paypal Payflow pro library

    - by John Stewart
    I already have an express checkout integrated with my Codeigniter application. Now I want to integrate seamless paypal where I collect the CC information and pass it to Paypal (via backend) and once everything is approved, my application shows that to the user. All this with out ever going to Paypal's website. I know that Paypal gives a bunch of sample code but they have so many different products that advertise to do the same thing. Is there any wrapper library in PHP that I can use for handling all this? What sort of design decision is involved in migrating to such system? Would I need SSL certificates for this?

    Read the article

  • paypal IPN php script

    - by pol
    I just realized that my paypal ipn handler in php doesn't work anymore (and I change nothing), I use the sample php script provided by paypal. I tried to isolate the problem by making several test, and at this time I can say that the problem is not the "VERIFIED" or the "INVALID" thing but comes from these lines: [...] fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { // check the payment_status is Completed [...] Anyone know if paypal change something or why it doesn't work? thanks' ps: if I put my code before all the paypal tests (before the line "if (!$fp)") it just works fine

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >