I’ve been looking through all the examples and docs this week trying to drag my PHP skills from purely procedural to OO and MVC. Starting to get a feel for it and for me the best way to learn is actually do some coding.
I’m intending to use Yii for a project that will require users to choose an access level and pay for it via Paypal so I’ve decided to get this bit working first.
I have the Yii-User and Srbac modules installed and working so I may use those as a base.
My logic at the moment is:
Guests can access free parts of the site. Paid for parts require subscription.
To buy a subscription the user fills in a registration form (possibly Yii-User) and chooses an access level (say Silver, Gold, Platinium) that are defined roles (possibly using srbac).
Clicking the submit button takes them off to Paypal with the needed variables.
After paying they are returned to the site with the new access level (role). Paypal would also send an IPN notification to the site to stop people trying to bypass payment.
As I work through getting this set up I’ll update this thread. Anyone is welcome to comment.
First thing is to get the access levels that are available to buy showing in the registration form.