We have a LIVE APP ID, but the "checkout" process goes in a loop…

Hi!

We finally have a LIVE APP ID!

I’ve entered that, along with the live username/password/signature and set the “paypal” mode to “live”.

But when I go to complete my pledge, after entering an address, it asks me to select my pledge all over again.

What have I done wrong?

Are there any error codes you can see that I can’t?

Trying to go Live by Thursday!

Thanks!

  • Vinod Dalvi
    • WP Unicorn

    Hi Peter,

    Sorry to hear of the problem you are having.

    I could confirm the issue on your site.

    Is it also happening for you if you use payment gateway as Manual?

    Would you mind if I logged in to your site and did some testing? This might help get to the bottom of this faster. If this is ok, just grant me temporary admin access to your site by clicking “Grant Access” button in the WPMU DEV Dashboard Settings as described on the following page and reply on this thread after granting it?

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Kind Regards,

    Vinod Dalvi

  • Jack Kitterhing
    • Code Norris

    Hi there @peter van Gorder,

    Hope you’re well today! :slight_smile:

    I’ve just been checking all your settings etc on the site, checking for white spaces within the settings before the credentials and everything looks correct.

    When you say it doesn’t work, do you get any specific error codes? Does the payment show in your IPN history (PayPal account > account > history > IPN History) Please note depending on your country the IPN history can be in varying locations.

    Please advise. :slight_smile:

    Thanks!

    Kind Regards

    Jack

  • Peter van Gorder
    • Site Builder, Child of Zeus

    There are no error codes.

    After I enter my address, it takes me right back to a screen where I must click on the “pledge amount” radio button, then click “Fund this project” and then I’m asked for my address again.

    I never get to a paypal payment screen, so there is no payment history.

  • Peter van Gorder
    • Site Builder, Child of Zeus

    Question regarding paypal APP ID application:

    Given that we want to do Pre-authorizations (so we can charge later).

    Do I need to set “Get Payment Details” to “true” in the “adaptive payments” area of the application?

    If this needs to be set, then how do I set it after we’ve already been approved?

    I don’t see a way to update the application settings.

  • Jack Kitterhing
    • Code Norris

    Hi there @peter van Gorder,

    Hope you’re well today, after some further research I believe I’ve found the issue here.

    You’ve set “subscription payments” under the adaptive payments setting on the application form, where it should be one time.

    As far as I’m aware you can’t edit your App after approval, but you could email PayPal and see if their edit it, you can manage your apps here https://www.paypal-apps.com/user/my-account/applications/manage but I can’t find anyway you can edit an already approved app.

    Thank you.

    Kind Regards

    Jack.

  • Michelle Shull
    • DEV MAN’s Apprentice

    Hi Peter,

    I took a look at your site from your other thread on this issue (https://premium.wpmudev.org/forums/topic/not-working-yet-we-must-go-live-this-monday) and I see you have a URL rewriting plugin active. Is there any chance you’ve changed any of your Fundraising links via this plugin?

    I see the issue you report, I’m being looped back to the backing page instead of being directed to PayPal. I’m inclined to think this has something to do with redirections you’ve tried to implement. Can you confirm?

    Thanks!

  • Peter van Gorder
    • Site Builder, Child of Zeus

    I think I can help.

    I have a software engineering degree.

    If I can any lines of code that would help you debug the issue, I’d be very happy to do so. I am completely comfortable inserting lines of PHP code wherever you want so that we can all fix this and move on.

    I am in California, USA and will be at my computer at 11pm this evening and onward until about 2am, but would go even longer if we’re making progress.

    We are completely invested in making this work – our business model depends on it working. And I am more than happy to do anything you ask to test, debug, or what ever it takes to get your plugin working.

    We hope you see how this is mutually beneficial. But need you to know we need to solve this immediately – or find a less favorable solution.

    So, please contact me tonight and put me to work in helping solve this issue.

    THANK YOU!

    – Peter and the whole ClutchMonkey Team.

  • Peter van Gorder
    • Site Builder, Child of Zeus

    Hi Guys,

    We have the correct settings in paypal, according to how you have told us to set it and I don’t have any redirection plugins installed causing the problem.

    Can we talk on the phone?

    Or is it the case your programmer has moved on and there’s no way to fix the code that’s not working?

    Thank you.

  • Vinod Dalvi
    • WP Unicorn

    Hi Peter,

    The Paypal didn’t contact us yet.

    We provide support through forum, email and live chat in specified timing but we don’t provide phone support.

    For further troubleshooting could you please just send your log in info through our secured contact form: https://premium.wpmudev.org/contact/

    – Choose “I have a different question”

    – Include my name in the subject “Vinod Dalvi”

    – Include the URL of this post in your message so that I may track this issue better

    – Include login information (WordPress admin info username + password )

    – Include FTP Details

    Regards,

    Vinod Dalvi

  • Peter van Gorder
    • Site Builder, Child of Zeus

    Here’s a report back from PayPal:

    ____________________________________________

    Hi WPMU DEV Community,

    CC: Marc

    My name is Magarvin from PayPal Merchant Technical Services.

    I was contacted today by Marc regarding their test site at http://clutchmonkey.com/back-it/test/ not working.

    I went through the process myself and found out that the page is looping the user back to the beginning when ‘Complete Pledge’ is clicked.

    I checked his App from here and it does have ‘One-time Payments ‘ enabled on it.

    As far as I can see when I went through the checkout process, the looping issue is not being caused by PayPal.

    Can you further investigate this from your end?

    If the actual call you are sending to PayPal is failing and hence causing the loop to happen, please provide the following to investigate:

    – A copy of the API request sent to PayPal

    – A copy of the response received from PayPal.

    Please reply directly back to this email to reach me again.

    Thanks.

    Magarvin

    PayPal Merchant Technical Services.

    https://www.paypal.com/mts

    ____________________________________________

  • Peter van Gorder
    • Site Builder, Child of Zeus

    Hi Guys,

    As you probably know, we are still having the same “loop” issue associated with your plugin and we are now two weeks past our anticipated website launch date because of this.

    We have paid third party marketers to initiate marketing campaigns starting two weeks ago to coincide with the launch date so each and every day we don’t get this to work we are throwing money away – I’m sure you can appreciate that as a small company this is very detrimental to our ability to push past a very critical stage of our company’s early growth.

    We believe in you guys and want to make this work but this all needs to happen for us asap. Is there anyway we can knock heads on this together to get it running properly today?

    We would be more than happy to pay extra to get this working, as changing course would be far more expensive to us.

    Sincerely,

    Peter

  • DavidM
    • DEV MAN’s Mascot

    Hi there Peter,

    Thanks for all this additional info. I believe Jack was earlier mentioning a subscription setting because we’re seeing the following error message when attempting to donate:

    There was a problem connecting with the paypal gateway. (CODE)580029 One of the required parameters for subscription is missing

    That could be an indication of the account being setup incorrectly at PayPal but from the screenshot you referenced, that seems to be fine in this case.

    There are a couple extra helpful bits mentioned in this thread:

    https://premium.wpmudev.org/forums/topic/having-issues-with-the-fundraising-gatewaycode580029#post-749106

    Specifically about mod_security. Do you by any chance have that enabled on your server?

    I’ll chat more with the team about this as well. Looking forward to getting this sorted asap!

    Cheers,

    David

  • Peter van Gorder
    • Site Builder, Child of Zeus

    Hi,

    What do you need mod_security to be set to?

    I’ll set it if I can – tell me what it needs to be.

    If there are any other settings you need, let me know.

    In the meantime, I’ll try to install something to list all current php settings.

    Also, I clicked on the link you provided:

    https://premium.wpmudev.org/forums/topic/having-issues-with-the-fundraising-gatewaycode580029#post-749106

    I did not see the help or post you where talking about. Instead, I got a list of posts.

  • Vinod Dalvi
    • WP Unicorn

    Hi Peter,

    Thank you for sending me the site details.

    The plugin doesn’t need mod_security but the issues are commonly caused by it. find more discussion about it in the following reply.

    https://premium.wpmudev.org/forums/topic/having-issues-with-the-fundraising-gatewaycode580029#post-731500

    I tried to access your site http://dev.clutchmonkey.com/wp1/ but it’s just displaying blank white page.

    Could you please make it accessible so that we can troubleshoot it?

    Also please check whether the solution posted in the following reply helps you to resolve this issue.

    https://premium.wpmudev.org/forums/topic/having-issues-with-the-fundraising-gatewaycode580029#post-754585

    Regards,

    Vinod Dalvi

  • Michelle Shull
    • DEV MAN’s Apprentice

    Hey Peter!

    That thread was internal, which is why you couldn’t see it, here’s the actual fix that was shared there:

    For the records, the issue was related to some encoded characters contained in the IPN message.

    The fix required to set the paypal account charset to UTF-8, and the following change in the code in the file ../fundraising/lib/gateways/paypal.php:

    The IPN verification request body was built in this way:

    $req = 'cmd=_notify-validate';
    if (!isset($_POST)) $_POST = $HTTP_POST_VARS;
    foreach ($_POST as $k => $v) {
    if (get_magic_quotes_gpc()) $v = stripslashes($v);
    $req .= '&' . $k . '=' . urlencode($v);
    }

    I changed it to this:

    $req = 'cmd=_notify-validate&' . file_get_contents("php://input");

    We haven’t had reports of similar issues and we are not sure if this method would work on other environments, so this will not be included in the production version.

    Cheers,

    Jose

    I’m going to update that thread with a link to this one, since you are in fact seeing a similar issue, and I’m going to send a batsignal to @jose, since he found the fix above.

    Thanks, Peter! We greatly appreciate your patience!

  • Peter van Gorder
    • Site Builder, Child of Zeus

    It didn’t fix the problem.

    Also, just FYI, it’s not clear from above whether or not I’m supposed to replace all 6 of the lines above with the new one, or just the first line with the new line.

    But I tried replacing just the one, and then all of them and neither worked.

    Also, if the plugin has any proper error checking at all, then it looks more to me like the plugin isn’t passing the “funding amount” forward, because it loops back to ask for it again.

    But, I guess ultimately there isn’t any good error checking in this plugin because nobody knows why it’s not working and there are no error codes being reported.

    <sigh>

  • Jose
    • Bruno Diaz

    Hi there Peter,

    Hope you are doing weel despite this annoying issue. :slight_smile:

    The code above is to fix an issue with the PayPal verification not being processed correctly. This is a step after the payment is registered in PayPal.

    As per what I understand from the thread, your problem is occurring before the payment is registered in PayPal. You are not receiving any payment and your IPN history in PayPal is empty, correct?

    I can grab the credentials from the mail that you sent to Vinod. Please confirm if I understand correctly the issue and I’ll take a look in your site.

    Thanks,

    Jose

  • Peter van Gorder
    • Site Builder, Child of Zeus

    Correct!

    I’m not even getting to paypal.

    And, if this helps, I think this var is not getting set:

    $this->is_funder_confirm

    for this to work in fundraiser.php :

    if(isset($this->is_funder_confirm) && $this->is_funder_confirm){
    $pledge_id = (isset($_SESSION['wdf_pledge_id']) ? $_SESSION['wdf_pledge_id'] : (isset($_REQUEST['pledge_id']) ? $_REQUEST['pledge_id'] : ''));
    if($pledge_id)
    $this->create_error(__('You have not made a pledge yet.','wdf'),'no_pledge');

    if(!$this->wdf_error)
    do_action('wdf_gateway_confirm_'.$_SESSION['wdf_gateway']);
    }

  • Peter van Gorder
    • Site Builder, Child of Zeus

    I have a few “echo” statements on line 874 of fundraiser.php.

    Feel free to remove, or whatever. I’ll stop poking around in there if you’re going to, otherwise we’ll stomp on each other’s changes.

    If you’re NOT going to get to this for some time, then let me know so I can keep debugging.

    Thanks!

  • Jose
    • Bruno Diaz

    Peter,

    I’ll try to get to this issue as soon as possible, but most likely I’ll be able to catch up on this late tonight or tomorrow morning.

    Anyway, by reading through the entire thread, I think that we escalated this to a complex coding issue to early.

    I’ll suggest you a few things to check. -sorry in advance, I might be repeating something that was already told in the thread, it is hard to keep track of all the posts here and also the emails-.

    – What are the difference between your DEV environment and the live one? Is it the same host, same plugins, same theme?.

    – Did you already try to run a plugin conflict test?

    An easy way to do this is by renaming your plugin folder to something else, create a new plugin folder and put only the fundraising plugin into it. (do not access the plugin dashboard during this test until you restore the folder back).

    – Did you test using a default theme like twentytweelve?

    – Did you check if there is something wrong in your .htaccess that might be causing the loop? Does it looks the same as your .htaccess in the dev environment?

    Please advise.

    Thanks,

    Jose

  • Peter van Gorder
    • Site Builder, Child of Zeus

    Jose! You come highly rated! I’m glad you’re helping!

    The dev and live are same setup. (originally we had our LIVE site on another server, but recently pointed DNS to where DEV is. So they’re both the same, but dev.clutchmonkey.com doest resolve anywhere right now.)

    I have another installation that’s clean where you can test/try/poke/debug…

    http://clutchmonkey.com/wp2/fundraisers/test/

    This /wp2/ installation has the simple 2012 theme and only the Fundraiser plugin installed. Same behavior.

    Looks like I can’t enable your access in the backend for wp2 because I can only have 1 plugin active.

    Let me know what you want to do and I’ll set you up to do it.

    Thanks!

  • Jose
    • Bruno Diaz

    Peter,

    Please send me the following information for wp2 via contact form :

    – In the subject field add “Attn: Jose”

    – Link back to this thread

    – Include WP admin/network access

    – Include FTP host and credentials.

    On the contact form, select “I have a different question“, this ensures it comes through and gets assigned to me.

    Thanks,

    Jose

  • Peter van Gorder
    • Site Builder, Child of Zeus

    José,

    It seems as though you’re doing everything you can to make this plugin work, and we appreciate that.

    The most important bit of information for us right now is knowing when you think this will be resolved. The reason for this crucial piece of information is that we are several weeks behind schedule with our launch because of this plugin challenge and a few of our investors are asking questions. They specifically asked us what the timing will be here for a fix and they expect an answer from us by midmorning tomorrow at 11:00am PST.

    Most sincerely,

    – Peter van Gorder

  • Peter van Gorder
    • Site Builder, Child of Zeus

    I read the thread. Thank you.

    Where/when do you see error codes? I don’t see error codes, I just go in a loop where it asks for a mailing address, then asks you to choose a funding amount.

    Also, I went in and set the PayPal encoding to UTF-8. But to no avail.

    Thanks for all you’ve done, it’s been heroic.

  • Jose
    • Bruno Diaz

    Hey Peter,

    Where/when do you see error codes?

    I see this by inserting debug traces into the code.

    The expected behavior is to receive a success response from PayPal for the preapproval request. This response would contain a key. Then, the plugin will take the key and use it to build a redirection that will send the user’s browser to PayPal.

    When the PayPal response is not sccessful -like this case-, the plugin just reload the first step of the payment process.

    I’ll grab request and the error information and send it to you via email so that you can send it to PayPal support.

    Cheers,

    Jose

  • Jose
    • Bruno Diaz

    Hey @peter,

    Just noticed that this issue is still opened.

    For reference, this was solved after several contacts with paypal support. We tried almost everything, but at the end we didn’t changed anything.

    PayPal wasn’t validating the email parameter sent in the request, and it sudently started to work when we complained about it. :disappointed:

    Thanks for your cooperation Peter. I’ll mark this as resolved. :slight_smile:

    Cheers!

    Jose

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.