close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problems setting up PayPal Sandbox

Thread began 3/19/2018 12:02 pm by s.joiner74419001 | Last modified 3/23/2018 10:35 pm by Ray Borduin | 315 views | 17 replies |

s.joiner74419001

Problems setting up PayPal Sandbox

I can not seem to get Sandbox testing working. It just directs straight to the failure page.

So far I have tried setting up new PayPal Sandbox test accounts, entered the new credentials in the gateway settings but with know success.

I have seen on other forum posts that there was an error in the eCart code notified by @Warrio on 6/14/2015 5:30pm.

which stated that the following line of code had to be changed

from: $WA_PP_ECO_Set_params[1][$nextIndex] = "".($WA_PayPal_PayPal_API_TestMode) ."";

to: $WA_PP_ECO_Set_params[1][$nextIndex] = "true";

I tried this change on both confirm.php and pp_confirm.php but still it directs to the failure page.

I dumped the session and the result is as follows:

array(11) { ["WAENCRYPTEDRETURNUSED"]=> bool(false) ["WAENCRYPTEDRETURNSUCCESS"]=> bool(false) ["rtm_application_Items"]=> string(262) "1|WAECART|rtm_application|WAECART|Right to Manage Online Application Form|WAECART||WAECART|0|WAECART|1|WAECART|150|WAECART|1000|WAECART|6|WAECART|3|WAECART|152147432825588538|WAECART|0|WAECART|483.33333333333|WAECART|1 rtm_application (1)|WAECART|333.33333333333" ["WAEC_ContinueRedirect"]=> string(86) "/registered-applications/consent-form.php?entryID=49&submission=No&fee=Unpaid&accID=35" ["eCart_PPECO_System"]=> string(2) "US" ["WA_BillingAgreements"]=> array(0) { } ["PayPal_ECO_Token"]=> string(0) "" ["ECO_Auth_Request"]=> string(1575) "admin-seller_api1.gmail.com2M4W7NGLSB3DGA2SAFcWxV21C7fd0v3bYYYRCpSSRl31AAbS0JdviqLCGl89FuSG9c631VmM63.0http://www.rtm-conference.org.uk/registered-applications/pp_confirm.phphttp://www.rtm-conference.org.uk/registered-applications/view-cart.php?ppreturn=trueSoleBillingSale483.33483.33rtm_applicationRight to Manage Online Application Form483.3311Sale" ["ECO_Auth_Result"]=> string(0) "" ["WAVT_consentform_437_Errors"]=> string(0) "" ["consentID"]=> int(8) }

Not quite sure if this gives an indication to what the problem is..

I have zipped and attached all relevant pages.

The user is starts from the consent-form.php page and when they submit the form they're directed to the view-cart.php page and from there taken to PayPal.

Help please.
Thanks in advance.

Attached Files
pages.zip
Sign in to reply to this post

Ray BorduinWebAssist

You should not need to update that line manually... I'd change it back.

The credentials are saved in the webassist/ecart/checkout/credentials/gateways.php

Are you uploading that file after updating your username and password and setting it to test mode? That could be the issue. I'd need FTP access to fully test.

Sign in to reply to this post

s.joiner74419001

Hi Ray..Ive tried it with or without changing that line of code. I only changed it because of the post by 'Warrio' which you acknowledged, so I assumed it was a noted error that needed changing.

And yes I had remembered to upload the new Gateway credentials.

FTP and database details in PM

Many thanks

Sign in to reply to this post

Ray BorduinWebAssist

The global test-mode is set to false on line 5 of the gateways.php file. That is where you should update it instead of on the page.

When you look at that file are the credentials for the username and password correct for your test-mode account?

Have you created a test-mode user?

I honestly don't use test mode. I usually do live transactions and refund them since paypal also refunds all transaction fees.

What page on the site can I go to to add items to the cart and check out? I'll take a look and debug to see if I can find anything or at least get a relevant error message.

Sign in to reply to this post

s.joiner74419001

Hi Ray.. you can access the page from URL in PM

It will take you to a simple form.

in the form, choose 'sole' owner, tick all the radio inputs, choose yes for 'Do you live at above property', tick the declaration and submit the form. This will take you to the view cart page which directs to PayPal.

Many thanks.

Sign in to reply to this post

Ray BorduinWebAssist

Your server seems to be blocking communication with the paypal server. The issue might not be with the code at all.

I created a sample page /untitled.php that tries to communicate with the webassist server and that won't work either. You may need to contact your hosting provider and ask why curl isn't able to communicate with the paypal server. You may need to enable something on the server admin control panel.

Sign in to reply to this post

s.joiner74419001

Hi Ray.. So how come it works in live mode. its only an issue in test mode and the Sandbox.

If this is the case. Whats different about how the server communicates with Sandbox than the live PayPal?

Whats 'Curl' by the way?

Sign in to reply to this post

Ray BorduinWebAssist

Well... maybe you have the paypal domain open but not the sandbox? Are you logged into the sandbox when you test? I think you have to log into sandbox first before doing tests in that session.

The live site uses:
https://api-3t.paypal.com/2.0/

sandbox uses:
https://api-3t.sandbox.paypal.com/2.0/

Perhaps one is open for communication and not the other? All of the other code is the same for sandbox and live. The only thing that changes is the url of the page. I see that no response is given at all. That usually means it is blocked at the server level. Otherwise you should at least get a permissions error.

CURL is the way php communicates with remote web sites like paypal. http://php.net/manual/en/book.curl.php

Sign in to reply to this post

Ray BorduinWebAssist

I created a test page:
http://www.rtm-conference.org.uk/untitled.php

It shows that you haven't updated your server to TLS 1.2. That is probably the issue. Show that page to your hosting provider and ask them to fix it for you. That is probably the issue.

Sign in to reply to this post

s.joiner74419001

Excuse my ignorance.. but whats TLS?

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...