[26-Sep-2024 23:48:51 UTC] PHP Fatal error: Uncaught Error: Undefined constant “PAYPAL_MODE” in
Find and replace all PAYPAL_MODE
with whatever variable you want to name it.
Well, it’s more than just “placing it here”. If you don’t properly download it via the Composer command, the library will not be added to your Composer files. So based on what you’re saying, you don’t have Composer properly installed or installed at all?
There is a link to the .exe file in this introduction page from the official Composer website. Scroll all the way down and look for " Installation - Windows". That’s the executable file you want to install. Once you properly install Composer, you can simply just open up Command Prompt and type in that commend I gave anywhere you’d like. That’ll allow you to download Composer properly. Otherwise you’d have to go into the main Composer files manually and add in the namespaces and such and I’d doubt you want to do that.
…
Yup, but if you look at the screenshot below, there’s a bunch of Composer specific files. So it’s really confusing. I mean sure maybe it could have been downloaded or transferred from somewhere, but that’s not the right way to use those files if that’s the case.
He’s also said he’s tried like 6 different SDK’s, so it’s probably because someone keeps telling him to use a composer based system when he doesnt want to…
Well no. They’ve had those files even before me helping them out. So this “6 different SDKs” is from a bunch of people telling them what to do when they were at maybe 2 SDK libraries the last time I tried helping them. If they went the route I had laid out, it would have been said and done.
I don’t want to be handing answers on a silver platter because that’s not what the forum is about. I could have just told them the reason why they’re having such a difficult time implementing the PayPal payments is because they’ve put the vendor folder in a location where it doesn’t seem like they know where it’s located. Otherwise, why is so complicated to find the autoload.php file when you can clearly see it in the screenshot?
shrug from the limited interaction i’ve had with them (I have not read the other thread), the user seems to be quite uncommited to one course of action, and flits back and forth to whomever last suggested something’s system. Which is why I have stopped trying to assist, as it seems to have only confused them further to suggest something that does not involve composer. I’m not sure why the recommendation is to use a 3 year old deprecated SDK that requires a system the user doesnt want to use, but… best of luck.
Someone is listening!!
Yes I am confused!!
I would need to setup composer and install both to shared hosting account, and also windows, to get the composer to work in the first place.
This is why I am not after a composer setup.
Well I mean you were trying to install the paypal-php-sdk library initially which requires Composer. You were having a lot of issues because all of the examples you were using were from random sources which I assume weren’t all complete and a mesh-mash of random code snippets that don’t correlate with each other.
So if you don’t want a Composer setup, I’d suggest removing all of the Composer specific files then because it doesn’t make sense to keep unused files and complain none of them work. You can definitely use Braintree if you wanted to in replacement of the paypal-php-sdk library. Just note that I’m not sure Braintree has a “bootstrap” or “autoload” file. If they don’t, it will come right back to the concept of installing via Composer. You generally only have 2 options for these types of things when it comes to 3rd party.
I have deleted all SDKs now.
Choosing a different route now.
Ok, let us know what you chose so we can help you out.
I moved over to using the Javascript, curl environment.
I wanted more control server side really, but think I can achieve what I need with a bit of tweaking if I can do most of the work client side and then work the curl to handle the database side to handle the backend.
It is functioning and taking a payment now just a few bugs to sort out with the paypal javascript, clicking paypal pops up the paypal window, but clicking on pay by credit card scrolls the div down and does not pop up the credit card but puts it within the page. This is my only bug really.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.