Open alexandernst opened 10 years ago
@alexandernst
Unfortunately, it has not been ported yet. It definitely will be but the problem is I dont use Yii 1\2 in day by day work. Its hard to keep it up to day and in sync with payum library (as I do with PayumBundle for Symfony).
Would be good if some take care of the extension and maintain it. Someone who know Yii very well. I'd more than happy to help such guy to understand Payum.
@makasim I'm asking because I'm considering using Yii 1 or Yii 2 in a project I'm starting and I know I'll depend heavily on PayPal.
What is the state of this extension regarding Yii 1? Are there known bugs or missing features? If yes, then maybe it would be better if someone (maybe me :smile: ) fixed those in first place, before trying to port it to Yii 2.
@alexandernst I've tested payum 0.7 (I believe) with yii sandbox and paypal express checkout. Since then some bugs were fixed in paypal lib itself not really critical.
So It really possible (yii1) to use it with paypal even recurring or referenced payments.
Yii extension does not provide support for notifications yet.
@makasim By "notifications" you mean a proper IPN handler that will save messages?
yes, the lib provide some tools to mange them, but it is not fully supported, youd have to write some code to make IPN work.
@makasim Ok, I'll be using Yii 1 then and try to make IPN work decently. The hard part will be the cron task (some IPN replies may fail so they must be sent back again at some point in the future).
BTW, I'll also try to push the other 2 issues once I'm done with the project itself and the notifications handler.
Sounds good, contact me (payum@forma-pro.com) if you need any help.
Ok, I'm done with the rest of the project I was talking about, it's time to implement the PayPal part. I saw the basic "how to install" and then did it. Some quick questions:
vendor
folder contains the entire Yii framework, which I already have in another folder. Can I delete it and use just payum (aside with kriswallsmith
and twig
extensions)?Also, I nocited that even in the master branch, the Yii extension points to Core 0.8.x.
Should I start by updating all those to the latest available stable release? If "yes", are there any breaking API changes?
Yet another question: Why is composer installing payum/paypal-express-checkoutnvp version 0.6.4 when my composer.json is configured to @stable
. Where is that version matching set?
I see that at least the PayPal Express and PayPal IPN extensions require payum 0.6.*, but the latest payum is 0.9.2 (some critical bugfixes were done in that gap). Is that left on purpose?
there we some fixes, not that serious. The fixes more about architecture of library (with BC breaks) and new features and payments. BC breaks listed here https://github.com/Payum/Payum/blob/master/UPGRADE.md
I am not sure why it installs 0.6, I believe it has to install 0.7 version at least because there is such release of extension for Yii. https://github.com/Payum/PayumYiiExtension/releases
The vendor folder contains the entire Yii framework, which I already have in another folder. Can I delete it and use just payum (aside with kriswallsmith and twig extensions)?
You can put it whenever you want and use your version (your autoload has to take over the composer one) but composer installs it to vendor too because of this requirments https://github.com/Payum/PayumYiiExtension/blob/master/composer.json. I dont know how yii developers do the job ,so maybe putting such requirements is not that good. We can drop it, but in this case we have to descrtibe the way it has to integrated to Yii.
Also, I nocited that even in the master branch, the Yii extension points to Core 0.8.x. Should I start by updating all those to the latest available stable release? If "yes", are there any breaking API changes?
I've not worked on the extension lately so it maybe out of sync with the rest of the lib. It definitly be good to update it to the latest version. Here's the list of BC breaks: https://github.com/Payum/Payum/blob/master/UPGRADE.md
I can help you with payum related stuff if you will be able to test its integration to yii framework.
Ok, I'll start by updating to latest stable. I usually code with Sublime Text 2, but maybe an IDE would be better for this particular case? What do you use?
Do you have any code-checking tool setup so that I can be sure that I'm not breaking anything?
I am using phpstorm, there also a sandbox where I test it: https://github.com/makasim/PayumYiiSandbox
You may try to use it too
Ok, I think I setup the Yii Sandbox successfully. The expected result is (after logging in with my sandbox paypal account) a simple text-only json-style result page describing the operation, right?
About PHPStorm, there is a Linux version (yay!) but it's a 30 days trial, so let's hope I can finish fixing everything in that time :)
Do you have a project file uploaded somewhere or should I create it?
a simple text-only json-style result page describing the operation, right?
right!
Do you have a project file uploaded somewhere or should I create it?
there is not any need for that,
After #6 composer install
installs the right paypal ipn/express versions :)
Next thing, remove Yii's dependency (or rather, make it some sort of 'soft' dependency so composer can skip it and let the user configure the right path to the Yii framework). I had a quick look at the vendor/composer folder but I couldn't find where Yii gets loaded. Any tips?
@alexandernst here: https://github.com/Payum/PayumYiiExtension/blob/master/composer.json#L41
We can move it to suggest
section.
Yes, that will make composer stop installing Yii, but what about the class-loading? Where is the part of the code in Payum-Yii that says "hey, Yii Framework is located /at/this/path so use it"?
In this case you have to manually configure a composer.json autoload section in your project.
I dont see other ways... we require it or we setup it manually.
Hmmm. Let's think about it as a plain Yii extension that people would install and expect to just-work (tm).
Being an extension, it should go inside the protected/extensions
folder in a Yii project. Which means that the user should already have inserted payum
in the components
section of the project.
That means that we actually don't need to load anything as Yii is the one that will load the extension. So, yup, we should just move yii
to the suggests
seciton in the composer.json :)
Will write a patch in a moment
Any news on this? Would love to use a Yii2 module for Payum.
I've never worked with Yii and dont plan to work with it. So if you need it working with Yii2. Please do it yourself. I help you with Payum part.
I was assigned shortly an year ago to this project, but then my boss changed his mind I never could finish the job. I still want to do it, I just don't get to find any spare time :(
Opened a git for making a Payum Yii2 module: https://github.com/iadj/yii2-payum
I'm wondering if this plugin will be ported to Yii 2 (or if it's already compatible with Yii 2)?