Pro: Testing bookings in Paypal sandbox mode
WordPress Event Management, Calendars & Registration › Forums › General Question › Pro: Testing bookings in Paypal sandbox mode
This topic contains 33 replies, has 4 voices, and was last updated by Ricardo Lodroño 11 years, 8 months ago.
-
AuthorPosts
-
May 8, 2013 at 7:38 am #5746
Hi Stephen!
I’ve been testing around with my paypal sandbox accounts (merchant and buyer). I’ve made a booking and all the process works fine, but in Bookings list, the payment appears as ‘pending’ even though the ‘simulated’ payment has been completed in paypal via the sandbox buyer account. Besides, Paypal doesn’t send me the confirmation email of the payment, so I’m thinking that this is the correct way and Paypal isn’t sending Event Organiser the confirmation of the payment because of the sandbox mode… Is this expected to work this way?
Your help and infos will be much appreciated, thank you!
RicardoRicardo LodroñoMay 8, 2013 at 4:44 pm #5755Its odd that PayPal isn’t sending you an e-mail (at the very least).
But regardless of whether you’re in sandbox mode or not – PayPal should issue an e-mail, and should notify Event Organiser of the payment (when payment has been confirmed) – and the booking will then be updated in your admin. Regardless of whether you are in sandbox / normal mode, the plug-in behaves (essentially) identically.
Is there any indication of a response from PayPal at all? (I..e on the booking admin page is there a ‘gateway response’ at the bottom – or does the payment reference appear underneath the booking reference in the bookings admin table?). If so, this indicates PayPal had trouble confirming the payment.
This can happen, for instance, if it requires you to manually accept payment which was made in a different currency to your PayPal account. Your Sandbox merchant account can have a different currency from your normal account – and so you may need to ensure the plug-in currency setting matches the account you’re using.
Stephen HarrisMay 9, 2013 at 10:45 pm #5771Hey Stephen,
Having the same issue with the current version where a redirect address is not being sent to / accepted by PayPal. No link to return to the website is given, and EO has no notice about any PayPal transaction.
Also does it matter what my PayPal website redirect settings are. My current auto redirect is set to off as it would require me to set a static feedback url.
Thanks
DarioMay 9, 2013 at 11:18 pm #5772Hi Dario,
I’ve not checked a live account – but I just have with a sandbox account and both the redirect / ipn handling is working as expected. Do you know which was the last version that definitely worked for you? There haven’t been any change made to the gateway handling since the 1.0.1 update. (The last update in particular fixed a couple of javascript errors and a formatting bug – nothing more).
Is there anything else that could have changed since it last worked for you?
Stephen HarrisMay 10, 2013 at 3:11 am #5774Unfortunately I can’t give you an exact version number for when it last worked (in fact it never actually worked properly in altering the pending status to confirmed).
From my email records it looks like around the 21st of March (think it was 1.1 beta) the redirection worked incorrectly (was redirecting to /news/2013/04/test-bourne-legacy/?payment-confirmation=paypal for my event hosted at /event/test-bourne-legacy ). You said that it was an easy fix (didn’t reference a fixed version number).
You then sent me 1.0.2 beta which fixed the booking cap bug. I think I then updated to 1.0.1 official followed by 1.0.2 and then 1.0.3.
I have a feeling that your fix for the redirection may have caused the problem?
Also does the redirection have to go to the event page followed by /?payment-confirmation=paypal, or can it go to any page on the website with /?payment-confirmation=paypal attached (as I could set up a permanent auto redirect in PayPal).
DarioMay 10, 2013 at 6:34 am #5776Hi Dario, also for me the redirection is not working… I explain my situation more in detail, maybe it helps..
–I’ve created 2 sandbox accounts, a BUSINESS one (merchant) and a PERSONAL one (buyer). Both in Spain and both in EUR. I haven’t configured any other setting…
–In Event Organiser Pro booking settings, I have:
·Live switch: Sandbox Mode
·Paypal email: the one of my sandbox BUSINESS account, is this right?)
·Paypal local site: Spain /currency EUR (same than business account)When I make a booking, I’m redirected to Paypal and I log with my sandbox PERSONAL account, and make the payment. I get onscreen paypal confirmation with an ID fo the transaction, and saying me they’re going to send me a confirmation email, but indeed that email never arrives. Also, I remain stuck in this paypal page and I’m not redirected to EO event page, until I click in a link provided in the paypal page.
If I check my sandbox accounts, the payments are registered in both (BUSINESS and PERSONAL), and appear as confirmed. But in the other part, in Event Organiser Bookings page, the booking appears as pending and is not updated as ‘confirmed’.
I was thinking about two things:
–My site is in ‘maintenance mode’, so I thought maybe it can be a problem for PayPal to report EO because not allowing access, so I turned off maintenance mode but it doesn’t fix the problem.
–I’m using a theme based in Roots Theme (I don’t know if you know the project, is a starter theme based on Bootstrap, with some improvements: http://www.rootstheme.com). One of Roots Theme features is ‘clean URLs’ and relative URLs, so for example, the URLs to the plugins appear like: /plugins/wordpress-seo/…So I was thinking, maybe this is a problem? I’ve seen that in PayPal you can set an URL for ‘listening’ to IPN notifications to check if payments are made, etc. I suppose you set this URL in any way in the plugin and I don’t have to set anything, but maybe this URL is not working because of the ‘clean’ rewrites?
Only thinking about ideas…Many many thanks for your help, any information or ideas will be much appreciated.
Regards!!!Ricardo LodroñoMay 10, 2013 at 11:10 am #5777Ricardo,
That’s the correct way to set up the sandbox mode.You have to click the link to return to your site because PayPal only allows automatic redirection to static pages. This is on my todo list. You could set up a permanent redirect via PayPal but I think this would be over-ridden by the plug-in.
It could well be a conflict with a plug-in/theme. If you visit:
yoursite.com?eo-listener=ipn&eo-gateway=paypal
do you get a blank screen with ‘error’ (you should).If you don’t its probably a plug-in/theme confilct. If you do then it sounds like PayPal isn’t sending the IPN. Ensure IPN is turned on and/or check the IPN history in your sandbox account.
You may want to try disabling all other plugins/switching to TwentyEleven to check if there are any plug-in /theme conflicts. Also you can set up a demo site: http://wp-event-organiser.com/try-it/ to verify it works for you on a ‘fresh’ install.
Stephen HarrisMay 10, 2013 at 11:40 am #5778Many many thanks Stephen..
Things work fine in the demo site you provide (thanks for that!) with my sandbox accounts (anyway, PayPal doesn’t send me confirmation e-mail), but the rest of the flow works, payment gets confirmed in Booking list in admin etc.
In my site, I test the URL: yoursite.com?eo-listener=ipn&eo-gateway=paypal
And yes, I get a blank screen with ‘error’
So, according with your kind instructions, could be a problem with IPN turned off, but if it was true, it wouldn’t work in your demo site at all, isn’t true?
I’ve just made a test in my site and everything works exactly as in your demo site, but in the booking list I don’t get the ‘confirmed’ state for the booking… so strange..
Thank you very much anyway, Stephen!Ricardo LodroñoMay 10, 2013 at 11:52 am #5779Hi Stephen, also made the test of disabling my theme and activating TwentyTwelve, and the result is the same, all goes fine but booking list doesnt mark the booking as ‘confirmed’. The only difference I see between my site and your demo site is permalinks, when I come back from Paypal confirmation page to the site the URL is this:
http://yoursite.com/?post_type=event&p=1283&payment-confirmation=paypal
But I have custom permalinks activated, concretely /%postname%/
Couldn’t be a thing about permalinks right? Sorry for my lack of knowledge!
Thank you for all your help!Ricardo LodroñoMay 10, 2013 at 12:22 pm #5780That’s odd. It shouldn’t effect it but I tested it anyway, on a demo site with that structure and it works fine…
Do you have WordPress installed in its own sub-directory (as explaiend here http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory)
Another thing to check – put this somewhere in your theme where it’ll be visible
echo add_query_arg( array( 'eo-listener' => 'ipn', 'eo-gateway' => 'paypal' ), home_url() );
what does it display? Visiting that url should give you the ‘error’ page.
Stephen HarrisMay 10, 2013 at 12:55 pm #5781Hi again Stephen,
I have wordpress installed in the root folder…
About the other thing, this is what your piece of code displays in frontend:
http://mysite.com?eo-listener=ipn&eo-gateway=paypal
Many thanks Stephen, really grateful for your help!Ricardo LodroñoMay 10, 2013 at 12:58 pm #5782Mmm… ok, we’ll it should be
site_url()
anyway. But your casesite_url()
andhome_url()
should give the same thing.Could you view your sandbox account’s IPN history? You can e-mail me an example of one here: http://wp-event-organiser.com/contact/ (it should contain information about the purchase but also where the IPN was sent to ).
Stephen HarrisMay 10, 2013 at 1:05 pm #5783Ok checked with
site_url()
and get the same result thanhome_url()
Going to check IPN history, thanks again Stephen!Ricardo LodroñoMay 10, 2013 at 1:16 pm #5784Stephen, I’ve sent you (via email) a PDF print with one of the bookings from the PayPal IPN history.
Many thanks!Ricardo LodroñoMay 11, 2013 at 8:51 am #5794Hey Stephen,
Seems like my IPN was turned off on my merchant account. What notification URL should I set it up with?
Also it seems that I’m now being redirected back onto my site example.com/?post_type=event&p=289&payment-confirmation=paypal, but the status of the payment remains as “pending”.
I’m using a sub-directory for my wordpress installation.
When I use your test site, PayPal works just like on my site, leaves bookings as “pending”, BUT it did add paypal references such as ” Payment Gateway: paypal (7SJ50885YT574664Y) ” and this gateway response, which it didn’t do on my site.
Dario -
AuthorPosts