Simulated Paypal redirect urls behind login

Matti Varjokallio's Avatar

Matti Varjokallio

27 May, 2011 10:53 AM

Hi,

It seems the simulated paypal redirect urls, like
https://cheddargetter.com/service/paypal/simulate/productId/................
are only visible if you are logged in to CheddarGetter?

This makes unit testing / testing our project pretty hard as you normally use some test client. Could these pages be changed to public or use only http credentials?

BR,
Matti

  1. Support Staff 1 Posted by Marc Guyer on 27 May, 2011 02:05 PM

    Marc Guyer's Avatar

    Hi Matti -- We certainly intend for this to be easy. Interesting... It looks like we've worked around this issue in our own functional tests.

    With the same http connection that we use to simulate the redirect to the fake paypal stuff, we authenticate via simulating a standard login. That's obviously not ideal.

    I suppose enabling basic auth in the paypal simulation should do the trick. Let us look into that...

  2. Support Staff 2 Posted by Marc Guyer on 27 May, 2011 02:13 PM

    Marc Guyer's Avatar

    Hmm... actually, you might be able to do this already but it's currently a secret (undocumented). Simply append /auth/basic to the redirect url like so:

    https://cheddargetter.com/service/paypal/simulate/productId/wh.....atever/auth/basic
    

    or

    https://cheddargetter.com/service/paypal/simulate/productId/wh.....atever?auth=basic
    

    I didn't test that for you but it should work. Please let me know either way...

  3. 3 Posted by Matti Varjokall... on 28 May, 2011 11:58 AM

    Matti Varjokallio's Avatar

    Hi,

    I tried that and got the basic auth working. Much easier this way.

    I have still some issue as requesting the paypal accept url raises an exception every time in Python's httplib2. It however seems to do the trick (confirm the customer) before that so not a bigger problem. This may be a bug in httplib2 as well, have to dig into that when I have more time.

    Thanks,

    Matti

    h = httplib2.Http()
    h.add_credentials(username, password)
    response, content = h.request(redirect_url + '&auth=basic', 'GET')
    parser = PaypalLinkParser()
    parser.feed(content)
    try:
        # Raises exception
        response, content = h.request(parser.accept_url + '?auth=basic', 'GET')
    except:
        pass
    
  4. Support Staff 4 Posted by Marc Guyer on 01 Jun, 2011 05:02 PM

    Marc Guyer's Avatar

    I tried that and got the basic auth working. Much easier this way.

    That's good news.

    Have you found the problem with this exception?

  5. Dean closed this discussion on 16 Jan, 2013 08:02 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM