Welcome Guest, Not a member yet? Register   Sign In
I need help on paypal button encryption on codeigniter it doesnt work!

I need help on paypal button encryption on codeigniter it doesnt work! My script works perfectly if i dont use code igniter. please download attach files for my script. i uploaded my certificates on view and created a tmp folder on view as well. The code doesnt encrypt the hidden fields

I took a look at your files, but it wasn't obvious how they work with CI at all.

all the files there are located in view. i have a seperate controller to load the paymentView file. I didn't make the script i downloaded it at paypal forum. i tested that script outside code igniter and it works fine. i cant make it work on codeigniter. i dont know if i placed the certificates in the wrong place or the tmp folder. i cant figure it out

It's actual very poor CI practice to just dump of bunch of arbitrary files in your view folder. You might as well NOT use Codeigniter if you plan to do it this way (your view references include files but that folder is non-existent in your archive file.) You may have to put these files in your libraries folder and modify them so they can work in the CI framework or even use them in conjunction with a plugin. The manual has instructions for both scenarios and there are examples in the forums and the wiki (for example, see Creating Your Own Libraries.)

I am not really planning on doing the script as it is. I tried putting the PayPalEWP in the library and revised it as normal library and call it as normal the script still doesn't work. i wanna make this work first before ill make PayPalEWP a normal library class. i wanna know if i placed the certificates and tmp folder in the right directory or is there any configutarion on codeigniter that needs to be changed. if you can make the script work it will be very helpful. this works fine outside codeigniter by the way.

anyone please

This is rather hard to answer without spending a lot of time going through the files to figure out where something is going wrong. To get help you'll probably need to narrow things down yourself - for instance, one file accesses another to try to decrypt presumably, but is the file actually being loaded or is there something wrong with your paths? There is plenty of work left to do before reducing this to a question someone else can provide much help on.

You might also strongly consider getting a debugger setup you can use so you can step through the code and investigate a little better to see what is going wrong. I use Netbeans with XDebug, but whatever works its an invaluable tool.

[eluser]louis w[/eluser]
Pretty sure you shouldn't be sending out all paypal certificate stuff.

Did you check out this Wiki Post?

i spent like 4 hours yesterday trying to figure it out. is there any paypal button encryption library? or has anyone tried encrypting a form with codeigniter? if anyone does please guide me how to do it.

There are plenty of us who'd like to help, but you really aren't giving us anything to go on. If the script works without CI it is even less clear, because there is nothing CI would do to any of the included code. It seems to be just PHP code and some SSL functions for private/public key encryption.

At this point it could be anything - error in how you are using it with CI, directory/path error, insufficient permissions, you changed something between non-CI version and when you tried to use it in CI that broke it, and countless more. These files aren't something any of us could drop into a CI install on our machines and test out, I don't see how you might even be trying to use them with CI.

As it stands, I could only advise you put it back as a script that works on its own in its own directory, then with it fully working just do an include on it in your applicable controller function. It's not 'the right way', but again it is part of the process where you go one step at a time to see when and where something stops working.

Theme © iAndrew 2016 - Forum software by © MyBB