Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Can't Post to PayPal with .760
  • Posted: 08.07.2005, 20:50
     
    Slugger
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    13.08.06
    Posts:
    1185
    This worked in .750. I modified Xuser to work as a subscription-registration module. I sent info to PayPal via a PHP file (example: modules.php?op=modload&name=xuser&file=subprocess&tid=1) which processed the info and submitted to PayPal on load. But now I'm just getting redirected to Xuser's main page. Any ideas?
  • Posted: 08.07.2005, 21:11
     
    Simon
    rank:
    Steering Committee Steering Committee
    registered:
     December 2002
    Status:
    offline
    last visit:
    28.11.08
    Posts:
    13417
    Hard to say without knowing what changes you made to the files. How much debugging have you done?

    --
    Regards,
    Simon

    itbegins.co.uk - Zikula Consulting

    Please read the Support Guide
  • Posted: 08.07.2005, 23:19
     
    Slugger
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    13.08.06
    Posts:
    1185
    Simon,

    First, let me send best wishes to the UK. I can't help but feel sadness and outrage for what happend yesterday, in London.

    Second, thanks for the quick reply. I've eliminated that the redirect is coming from the subprocess page. I'm pressed to figure out why the URL shows I'm on the subprocess page (see above) but I'm still back on the main page. I thought it might be .htaccess rewriting for shorturls but I eliminated that possibility. At this point, I'm really not sure where to debug next.

    Slugger
  • Posted: 09.07.2005, 04:03
     
    Simon
    rank:
    Steering Committee Steering Committee
    registered:
     December 2002
    Status:
    offline
    last visit:
    28.11.08
    Posts:
    13417
    If you can email me the code I'll take a look (presumably it isn't a publically available module?)

    --
    Regards,
    Simon

    itbegins.co.uk - Zikula Consulting

    Please read the Support Guide
  • Posted: 09.07.2005, 09:39
     
    Slugger
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    13.08.06
    Posts:
    1185
    Sent. :D
  • Posted: 22.07.2005, 03:00
     
    Slugger
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    13.08.06
    Posts:
    1185
    I can move the file subprocess.php to another module's directory (for example Web_Links), call it as above (modules.php?op=modload&name=Web_Links&file=subprocess&tid=1), and it works! But put the file back in xuser and, instead of opening the page, I get xuser's main page.

    It appears my attempt to access the page is being hijacked by the main user function which, in turn, does not allow me to open the file. The URL in my address bar says I should be where I want to be but what I'm seeing and getting tells me I'm not.

    As it works in .750, I assume this is due to a "fix" in .760.
  • Posted: 23.07.2005, 02:03
     
    InvalidResponse
    rank:
    Professional Professional
    registered:
     September 2003
    Status:
    offline
    last visit:
    21.10.07
    Posts:
    2423
    true, true slugg-o ;) ..index.php checks the module "type" and directs the user accordingly .. so if the module is an "API" type then you wouldn't be able to load individual files as you would under a "non-API" mod.

    -IR

    --
    http://www.invalidresponse.com
  • Posted: 23.07.2005, 03:26
     
    Slugger
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    13.08.06
    Posts:
    1185
    Hey IR!

    Any ideas on how to save their info into the database, process the subscription and post the info to PayPal (while redirecting the subscriber's browser) on a single click? Doing so within the API has been a challenge but I am sure it can be done.

    Slugger
  • Posted: 23.07.2005, 03:49
     
    InvalidResponse
    rank:
    Professional Professional
    registered:
     September 2003
    Status:
    offline
    last visit:
    21.10.07
    Posts:
    2423
    paypal's API (ipn) is pretty handy that way.. while you can use javascript to submit multiple forms, it's not a reliable way of doing things.. i'd suggest posting everything (except passwords) to paypal as custom fields and chop it up when it gets back..

    you might also want to look into including that subprocess page if you need it.. (i'm guessing the mod is "pnapi").. just replace echo 'stuff'; with $content = 'stuff'; then:

    function module_user_subprocess(){


    include('modules/my_module/includes/subprocess.php');

    return $content;
    }

    hope that helps some. ;) see ya
    -IR

    --
    http://www.invalidresponse.com
  • Posted: 23.07.2005, 05:52
     
    Slugger
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    13.08.06
    Posts:
    1185
    Thanks IR. That will work but I decided to eliminate the extra file and move it into pnuser.php. Seems to work.

    Slugger

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula