PDA

View Full Version : vBPurchase 1.0c.fl1


Ron1n
06-15-2005, 10:00 PM
FULL RELEASE!

**ATTN**
USE THE FIX LIST ---> AND MAKE SURE YOU HAVE COMPLETED EACH STEP BEFORE INSTALLING. IF YOU HAVE ALREADY INSTALLED, JUST MAKE SURE YOU DO THEM SOON.

For those of you with other versions installed please upgrade using the upgrade_OLDVERSION_NEWVERSION.txt and everything will workfine.

READ ALL OF THIS BEFORE POSTING AND BEFORE DOWNLOADING:
This is not a beta anymore, but it is for capable, expirienced users only. This can be used as a final product, but it is not meant to be a final product. Users will proabably want to add some features for their own forum to meet their unique needs.

Overview:
This is a purchase/member area hack for vBulletin that is integrated with paypal. It comes with no warrantee, no installer, and limited support. It has been tested on all 3.0.x versions and is working (for the most part).

Bugs:
- I did not include admincp phrases
- There are problems when usernames contain '

Suggestions:
- Custom order fields

Notices:
- There is no support extension, but this hack does automatically add users to a new usergroup if you want it to, and therefore you can have a support forum for your users who have actually purchased items.

For those that keep asking this, this is a store hack which is strikingly similar to the ones found at vbadvanced.com, vbcore.com, cinvin.com, go to their products.php page and you will see. ;)

It let's you add licenses/services/products and lets you sell each. You set the price and description from the admin, and it automatically appears in the purchase.php page, from their the user has the option to buy the product and once he/she has paid the price, they will be redirected to the page where they can download the file/license that they have purchased. Hope this descritption helps a little.

Like he has mentioned, you need to know what your doing and you are required to have a paypal account to install this hack, if you don't have paypal, then you pretty much can't use it I guess, not sure.Thanks shah :)

Madmax4321
06-16-2005, 06:22 PM
nice release mate *install* :)

Ron1n
06-16-2005, 06:27 PM
enjoy ;)

Oblivion Knight
06-16-2005, 06:30 PM
Perhaps this should be in the Beta forum for the time being while the bugs are found and fixed? :)

Thanks for deciding to share this with us though.!

Jolten
06-16-2005, 06:32 PM
I'd just like to see a demo or screenshots

Ron1n
06-16-2005, 06:38 PM
Perhaps this should be in the Beta forum for the time being while the bugs are found and fixed? :)I marked it as 'is in beta stage.'

I'd just like to see a demo or screenshots
If someone wants to provide these, they can.

dsboyce8624
06-16-2005, 06:40 PM
Check out the PayPal Sandbox.

You can create as many test accounts as you want.

Ron1n
06-16-2005, 06:51 PM
Check out the PayPal Sandbox.

You can create as many test accounts as you want.I tried, I dont have a credit card.

Marco van Herwaarden
06-16-2005, 07:28 PM
Since you indicate that this hack should be considered to be in a Beta stage, i took the liberty to move it to the Beta Forum. If you don't agree please say so with a motivation.

mikaelweb
06-16-2005, 07:44 PM
purchase.php?do=ipn
Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 1946

and you can not add products

Ron1n
06-16-2005, 07:54 PM
Since you indicate that this hack should be considered to be in a Beta stage, i took the liberty to move it to the Beta Forum. If you don't agree please say so with a motivation.I dont object. I am confused as to why there is a "mark as beta" and a beta section. Is there a difference?

purchase.php?do=ipn
Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 1946
No user is ever supposed to access do=ipn, that is for paypal only.

you can not add products
Yes, you can. You must mark the product as "active."

Marco van Herwaarden
06-16-2005, 08:09 PM
Hmm yes, i can understand the "Is in Beta Stage" is a bit confusing. That option was introduced solely for vB3.5 Beta hacks. For 3.0.7 we are already for a long time working with a Beta forum.

Madmax4321
06-16-2005, 08:24 PM
btw purchase_panel template in purchase.php doesnt exist

seems you forgot it :)

nexialys
06-16-2005, 08:33 PM
i see a reason for release, a status of work etc, but there is not a single way a description of the hack itself..

what is the use of this one ?!

Princeton
06-16-2005, 08:34 PM
screenshots would help

mikaelweb
06-16-2005, 09:15 PM
User

to download products do it by membersarea
auto close licenses after last day of it
if updates of products can be dowloaded true membersarea


maybe the admin part whit only one place to put stuff to products all in one place ?

Sean S
06-16-2005, 09:50 PM
thank you thank you thank you, thank you. :D I have been looking for such hack/script for over a month now and today I login and here it is. I would be more than happy to help you test it out and also donate to this project.

I have successfully installed it with no problems so far. I just have to test the purchase and see if it does redirect to the file. But so far i have had no errors :)

RichieBoy67
06-16-2005, 09:53 PM
Could you pleae provide a little more detail on what this actually does???

Does it allow users to post products or just admin??

Sean S
06-16-2005, 10:03 PM
Could you pleae provide a little more detail on what this actually does???


Does it allow users to post products or just admin??
For those that keep asking this, this is a store hack which is strikingly similar to the ones found at vbadvanced.com, vbcore.com, cinvin.com, go to their products.php page and you will see. ;)

It let's you add licenses/services/products and lets you sell each. You set the price and description from the admin, and it automatically appears in the purchase.php page, from their the user has the option to buy the product and once he/she has paid the price, they will be redirected to the page where they can download the file/license that they have purchased. Hope this descritption helps a little.

Like he has mentioned, you need to know what your doing and you are required to have a paypal account to install this hack, if you don't have paypal, then you pretty much can't use it I guess, not sure.

Lionel
06-16-2005, 10:41 PM
screenshots please.

Ron1n
06-16-2005, 10:45 PM
btw purchase_panel template in purchase.php doesnt exist

seems you forgot it :)

Yes, its been uploaded now.

screenshots would help
I haven't got the time.

i see a reason for release, a status of work etc, but there is not a single way a description of the hack itself..

what is the use of this one ?!
Think about it this way, if you need this hack, you know what it is. If you dont need it... go to vbadvanced.com. It is very similar to that one.

thank you thank you thank you, thank you. :D I have been looking for such hack/script for over a month now and today I login and here it is. I would be more than happy to help you test it out and also donate to this project.No problem, I'm glad you like it. Just let me know when you do find bugs.

User

to download products do it by membersarea
auto close licenses after last day of it
if updates of products can be dowloaded true membersarea


maybe the admin part whit only one place to put stuff to products all in one place ?I have no idea what your asking. The products are available in the members area already, the license does close after the last day, and the updates of products are available in the members area. I am not sure what your getting at.

RichieBoy67
06-16-2005, 10:46 PM
Personally I don't see what is so complicated about performing this install...... aside from the phrases not being included...

Where are the phrases???



For those that keep asking this, this is a store hack which is strikingly similar to the ones found at vbadvanced.com, vbcore.com, cinvin.com, go to their products.php page and you will see.


who keeps asking this?? Am I missing something? Seems like a pretty new thread to me...

Ron1n
06-16-2005, 10:54 PM
Personally I don't see what is so complicated about performing this install...... aside from the phrases not being included...I had a lot of trouble helping people with vBDownloads - and all that required was an absolute path, so I decided to just warn people about this. I bet 8/10 users wont be able to set up their paypal account to work with this the first time, and because I only want to hear actual problems, I decided to discourage most ppl from using it. When all the bugs are fixed, then I will make a general release with an installer so that all users can use it.

Where are the phrases???Read the main thread. Next time your added to my "ignore" list.

who keeps asking this?? Am I missing something? Seems like a pretty new thread to me...It has been asked 3 times. No big deal.

RichieBoy67
06-16-2005, 10:58 PM
Man, please do add me to your ignore list........ like I care... Actually, after that remark I don't even want to use this.....

I see its a matter of just opening and saving the phrases.. I just thought you forgot to include these......

nexialys
06-16-2005, 11:37 PM
hum... Ron1n, your actual behavior is not really the one of a guy wanting to share, you just insult people 3 times in 2 posts in your own release thread...

if you don't want to read questions, please don't release a thing, this will help you keeping your own peace of mind...

Lionel
06-16-2005, 11:52 PM
Makes sense that no one would want to buy from him.

vBTotal
06-17-2005, 12:18 AM
This makes me feel good, A hacked that I paid ron1n to do (this exact one) I paid him $175.00 to create, and yet he is releasing it to the public...how nice

yoyoyoyo
06-17-2005, 01:00 AM
in the READ ME it says:
- visit www.domain.ext/forumdir/products.php to see your new new page
however there is no products.php included in the file. I assume that instead this is supposed to read:

- visit www.domain.ext/forumdir/purchase.php to see your new new page

Ron1n
06-17-2005, 01:13 AM
hum... Ron1n, your actual behavior is not really the one of a guy wanting to share, you just insult people 3 times in 2 posts in your own release thread...I'm sorry, I don't see where I insulted anyone at all. Maybe I missed it, but I read back over my post and I didn't see any insults at all. As to not wanting to share, the only reason I released this was because I saw some interest for it and got several PMs asking for it. I am willing to share with everyone.

I see its a matter of just opening and saving the phrases.. I just thought you forgot to include these......I never make phrases because I am lazy. My comment about ignoring you has nothing to do with phrases, it has to do with your ignoring my post.

Makes sense that no one would want to buy from him.Where are you getting that people don't want to buy from me? Even today I had people at vBCore asking for me to make another hack for them. I'm sorry that I am not touchy-feely, I just dont have time for that.

in the READ ME it says:

I assume that instead this is supposed to read: http://www.domain.ext/forumdir/purchase.phpThat would be correct. Thanks.

In response to vBCore, I will double post because I feel that you brought up a valid issue that needs to be resolved in its own post.

yoyoyoyo
06-17-2005, 01:17 AM
I appreciate you sharing this with everyone- I have been looking for something like this for awhile. I added the cron job as indicated in the "fix list two" however when I went to run it to test it out I got this error:
Database error in vBulletin 3.0.6:

Invalid SQL: UPDATE ph_order SET `active`='0' WHERE `active`='1' AND `length` > '0' AND `start`+`length`*86400 < 1118974182'
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1

mysql error number: 1064

Date: Thursday 16th of June 2005 09:09:20 PM
Script: http://mysite.com/forum/admincp/cronadmin.php?do=runcron&cronid=20
Referer: http://mysite.com/forum/admincp/cronadmin.php?do=modify
Username: ADMIN
IP Address: XX.XX.XXX.XXX

Ron1n
06-17-2005, 01:23 AM
This makes me feel good, A hacked that I paid ron1n to do (this exact one) I paid him $175.00 to create, and yet he is releasing it to the public...how niceYou bring up a valid point, but if you recall, I reserved the full right to distribute and modify this vB hack. I am under no legal or moral obligation to you. Maybe you feel wronged that I am releasing this hack to the public, but it is perfectly ethical. I made a hack for your to use, you paid me, and you didn't use it. I see no reason why I should not release it other than to make you happy. If you had used it, I might not have released it out of respect, but everything is different because you aren't using it. Releasing this is not cheating you and it is not being dishonest.

As to whether this is an exact copy? No. I lost a lot of the source that I used to make your hack (about 1/3 of purchase.php) and when I asked if you still had it you said you didn't. Because of that, I was forced to redo many parts of the hack.

I am sorry you feel cheated or wronged. I wish you didn't, but because you have no solid reasoning for me to remove this hack, I will keep it up.

Ron1n
06-17-2005, 01:28 AM
I appreciate you sharing this with everyone- I have been looking for something like this for awhile. I added the cron job as indicated in the "fix list two" however when I went to run it to test it out I got this error:

The cron jobs is missing a '.

$DB_site->query("UPDATE ph_order SET `active`='0' WHERE `active`='1' AND `length` > '0' AND `start`+`length`*86400 < ".$today."'");
should be
$DB_site->query("UPDATE ph_order SET `active`='0' WHERE `active`='1' AND `length` > '0' AND `start`+`length`*86400 < '".$today."'");

yoyoyoyo
06-17-2005, 01:43 AM
The cron jobs is missing a '.

$DB_site->query("UPDATE ph_order SET `active`='0' WHERE `active`='1' AND `length` > '0' AND `start`+`length`*86400 < ".$today."'");
should be
$DB_site->query("UPDATE ph_order SET `active`='0' WHERE `active`='1' AND `length` > '0' AND `start`+`length`*86400 < '".$today."'");
thanks, but the orders.php file in the zip already had that line exactly the way you said to change it, and I still get the error.

yoyoyoyo
06-17-2005, 03:56 AM
After making the suggested changes I am still getting this error in the cron job:
Invalid SQL: UPDATE ph_order SET `active`='0' WHERE `active`='1' AND `length` > '0' AND `start`+`length`*86400 < '1118984065'
mysql error: Unknown column 'start' in 'where clause'

SunShina
06-17-2005, 04:27 AM
This makes me feel good, A hacked that I paid ron1n to do (this exact one) I paid him $175.00 to create, and yet he is releasing it to the public...how nice

This happen to me also i have paid someone here and he released the paid hack i know how it feel when people doing this ..

Marco van Herwaarden
06-17-2005, 06:11 AM
Unless you agree on transfering the copyright or agree on exclusivity, in most cases the coder will be free to do with the result whatever he wants. The price would probably be increased significant if you come to such an agreement.

You get what you pay for (or it should be like that) since you get the functionality you want.

Maybe this is not what you want to hear, but this is how things in general work with Software.

mikaelweb
06-17-2005, 11:33 AM
to make grupp off all this templates like vbulletin templates are done

Find in includes/adminfunctions_template.php
'subscription' => $vbphrase['group_paid_subscriptions'],
add under that line
'purchase' => 'products manager',

screenshots of ADMINCP

Ron1n
06-17-2005, 11:57 AM
thanks, but the orders.php file in the zip already had that line exactly the way you said to change it, and I still get the error.Before it had ".$today."', it should have been '".$today."'

After making the suggested changes I am still getting this error in the cron job:Invalid SQL: UPDATE ph_order SET `active`='0' WHERE `active`='1' AND `length` > '0' AND `start`+`length`*86400 < '1118984065'
mysql error: Unknown column 'start' in 'where clause'Change `start` to `date` - i renamed the column but forgot to update orders.php.

This happen to me also i have paid someone here and he released the paid hack i know how it feel when people doing this ..
What do you mean "how it feel." Please explain your current emotions and explain why you feel that way. Do you feel sad, mad, betrayed, lustfull, horny, envious, extatic? Do you feel that way because you were cheated, wronged, made fun of, taken advantage of, or betrayed? Honestly, I can't tell what your feeling.

Find in includes/adminfunctions_template.php
'subscription' => $vbphrase['group_paid_subscriptions'],
add under that line
'purchase' => 'products manager',I guess you want me to add this? Sounds fine w/ me.

screenshots of ADMINCP
Thanks :D

nexialys
06-17-2005, 12:09 PM
... some clients feel frustrated to see that they paid for a job and see that job released for free afterward... i've encountered this many times in my coder lifetime...

the only thing that any coder can do at first, to secure everybody is to state what is the price for an "exclusive work"...

example: a hack is requested by a client, the coder charge 50$ for the job, but if the client request to be the exclusive owner of that code, the coder will charge 100$ for the job... this is fair, this is exactly what we see in all other markets...

most of the tools you see in my list of hacks are jobs i've done for clients that did not required to have the exclusive job... i've done a lot of exclusive works that will never be released here for that reason...

the point for the client is the "released for free afterward".. they feel they were manipulated and stealed... but they have to remember that THEY requested something that was specific for their needs, something that was not included in the code... if we find useful to offer it to the community once it's done, this is correct...

Ron1n
06-17-2005, 12:18 PM
a hack is requested by a client, the coder charge 50$ for the job, but if the client request to be the exclusive owner of that code, the coder will charge 100$ for the job... this is fair, this is exactly what we see in all other markets...We had this talk before I made it. He asked what the price would be if he had exclusive rights to resell on vbcore.com. I told him it was more that he could afford ($5,000) and he decided to go with a single "license."

I didn't even make this all for him. I originally made something for mikaelweb, but he changed his mind 1/2 way through so I stopped.

From now on if you want to have an ethics discussion please start a new thread.

yoyoyoyo
06-17-2005, 01:18 PM
Before it had ".$today."', it should have been '".$today."'

Change `start` to `date` - i renamed the column but forgot to update orders.php.Thanks- that fixed it! :D$DB_site->query("UPDATE ph_order SET `active`='0' WHERE `active`='1' AND `length` > '0' AND `date`+`length`*86400 < '".$today."'");

GoTTi
06-17-2005, 02:00 PM
to make grupp off all this templates like vbulletin templates are done

Find in includes/adminfunctions_template.php
'subscription' => $vbphrase['group_paid_subscriptions'],
add under that line
'purchase' => 'products manager',

screenshots of ADMINCP

ron1n, im sure this hack is going to get huge when traffic pics up on it for sites offering things, and youve done a great thing releasing this into the wild.

can you, as time goes on, or if u can select someone, to keep the thread updated with other things added onto this hack like this here, on the first post so we can find the addons and modifications here, or will you be adding all this information and good stuff to the zip when you update it?

Ron1n
06-17-2005, 02:53 PM
can you, as time goes on, or if u can select someone, to keep the thread updated with other things added onto this hack like this here, on the first post so we can find the addons and modifications here, or will you be adding all this information and good stuff to the zip when you update it?I will continue adding them into txt update files until I make a general release. This just make it so ppl dont have to keep uploading new files since the changes are only take about 2 seconds to make.

mikaelweb
06-17-2005, 04:24 PM
this is error when testeing to Delete Product
Fatal error: Call to undefined function: query_result() in /home/codersla/public_html/forum/admincp/purchaseadmin.php on line 415

yoyoyoyo
06-17-2005, 05:03 PM
this is error when testeing to Delete Product
Fatal error: Call to undefined function: query_result() in /home/codersla/public_html/forum/admincp/purchaseadmin.php on line 415I get the same error when selecting the radio button "confirm delete." When I do not select the radio button and press DELETE I get a message that says "Could not find phrase 'Did Not Confirm Delete'" and when I check the product listings the product is still listed.

Ron1n
06-17-2005, 09:35 PM
For some reason vB 3.0.x doesn't have support for query_result or fetch_result, which I use frequently. I just added those two functions into db_mysql.php and i forgot I use them for vBPurchase so i forgot to include them.

this is error when testeing to Delete Product
Fatal error: Call to undefined function: query_result() in /home/codersla/public_html/forum/admincp/purchaseadmin.php on line 415Fixed with fix_list_five.txt

I get the same error when selecting the radio button "confirm delete." When I do not select the radio button and press DELETE I get a message that says "Could not find phrase 'Did Not Confirm Delete'" and when I check the product listings the product is still listed.Fixed with fix_list_five.txt

GoTTi
06-18-2005, 12:42 AM
got a error when deleting a product.

Fatal error: Call to undefined function: query_result() in /home/site/public_html/forum/admincp/purchaseadmin.php on line 415

edit: never mind see the fix.

GoTTi
06-18-2005, 01:07 AM
when adding a product with image, my image is not showing up. ideas?

Ron1n
06-18-2005, 02:04 AM
not with that info...

can you give me the info your filling out and also the html code produced by that table or a link to the product?

yoyoyoyo
06-18-2005, 04:00 AM
I was able to add an image with no problem: just enter the full url to the image, with no html or BB code. I noticed that the size of the image is fixed, and it would be nice to have a setting that would allow you to be able to indicate height and width instead of using a default setting. Also, it seems that the files added to the database and it would be nice to have the option to have them stored via file ftp to the server as well.

BTW, the last fixes seemed to have fixed the deletion error on my end when the CONFIRM radio box is checked, however when I do not select it I get an error that says Could not find phrase 'Did not Confirm Delete'.

If you are not automatically redirected, please click here.

Processing Complete - Proceedand I am taken back to the product page, and the product still exists, so that function is still not working.

I also tried adding a few services, however they are not viewable on the products page, just the items.

Are the licenses selectable/editable, or are they all "LIFETIME LICENSES"? I didn't see any options in the LICENSE area.

GoTTi
06-18-2005, 07:24 AM
i actually didnt fill out the path to the image. i did the browse and uploaded a image and it says successfully uploaded but shows the red error box.

Ron1n
06-18-2005, 07:56 AM
BTW, the last fixes seemed to have fixed the deletion error on my end when the CONFIRM radio box is checked, however when I do not select it I get an error that says and I am taken back to the product page, and the product still exists, so that function is still not working.Works fine for me, anyone else having this prblem?

I also tried adding a few services, however they are not viewable on the products page, just the items.Services are subsets of products, so are licenses. They will show up on the products page, not the main page. They work for me and show up on the correct page. Maybe you forgot to activate it.

Are the licenses selectable/editable, or are they all "LIFETIME LICENSES"? I didn't see any options in the LICENSE area.Licenses are editable and deletable from the admincp. I'm not sure what your getting at... In terms of length, that is set up when you add the license or when you edit it. They will last X number of days after being purchased and then expire. After they expire, users wont be able to download the product anymore.

i actually didnt fill out the path to the image. i did the browse and uploaded a image and it says successfully uploaded but shows the red error box.Um... I didnt include a feature to upload an image. You must be in the wrong thread.

yoyoyoyo
06-18-2005, 08:18 AM
Services are subsets of products, so are licenses. They will show up on the products page, not the main page. They work for me and show up on the correct page. Maybe you forgot to activate it.
I didn't have it configured correctly but it is working now as described. thanks
Licenses are editable and deletable from the admincp. I'm not sure what your getting at...I had it set at the default of 0 so it came up as lifetime. I changed it to 60 and now it shows 2 months. :D

I checked my edits and I am still getting errors of sorts with the deletion. I check the "confirm delete" button, but am not taken to a confirmation message, and it is deleted. This is not a big deal, since it can be deleted and added - I really don't care about a confirm delete option personally.

Everything else is working as advertised. thanks again.

C.Birch
06-18-2005, 08:51 AM
Design Fix:

Remove:

</td>
</tr>
</table>

From the end of the purchase_product_info, purchase_product_order, purchase_product_price templates because it breaks the design.

Also if you set something to free it still takes you to paypal.

Ron1n
06-18-2005, 01:44 PM
Design Fix:

Remove:

</td>
</tr>
</table>

From the end of the purchase_product_info, purchase_product_order, purchase_product_price templates because it breaks the design.


Also if you set something to free it still takes you to paypal.good call. i cant provide those in fix_list_six right now, but I will deal with them tonight.

mikaelweb
06-18-2005, 01:56 PM
here is the Template fix

yoyoyoyo
06-18-2005, 02:12 PM
small typo in purchaseadmin.php:print_cp_header("Mange Products");
should be:print_cp_header("Manage Products");

Ron1n
06-18-2005, 03:59 PM
noted.

mikaelweb
06-19-2005, 10:12 AM
when you do download at members area you get file but this file will not work you can not unzip this

this files are only name at database and size but no conten to it

GoTTi
06-19-2005, 04:29 PM
for my image error, i got confused with something, strike that please.

GoTTi
06-19-2005, 04:37 PM
/me hopes for fix 6 today

yoyoyoyo
06-19-2005, 06:58 PM
when you do download at members area you get file but this file will not work you can not unzip this

this files are only name at database and size but no conten to itI finally got around to trying to actually purchase something as well, and get the same error.

Ron1n
06-19-2005, 08:14 PM
this files are only name at database and size but no conten to itIt had the full content it was just being cut off at 64kb.

Also if you set something to free it still takes you to paypal.I dont plan to fix this... well, maybe I do. I might add another step for if the total price is 0.00 to just download the file.

The rest of the problems noticed were solved.

PixelFx
06-19-2005, 09:30 PM
with list six out now, how close is this to a stable release? Generally Speaking, and to install we do everything in your zip then added only stuff in list 6? or is it better to wait for your next version release? And thank you for releasing this :)

Mythotical
06-19-2005, 10:00 PM
NVM, got it fixed.

Ron1n, can you give me a list of all phrases that are in this hack so I can add them but just give my own description?

Thank you
Myth

axi
06-20-2005, 02:21 PM
How far is this from its final and finnished release? I would like to install it when its ready for use on a busy site??

Ron1n
06-20-2005, 03:11 PM
It is probably about 1-2 updates away from being final. I will publish it this weekend.

However, can people test out the showcases (testimonials and portfolio) and make sure they are working well?

Also, I would like to make sure everything is working correctly in the member's area.

PixelFx
06-20-2005, 05:20 PM
Side question: is there any chance of getting this system to work through the vbulletin subscription system? the reason I ask is my IPN:URL with paypal is already tied up with other commercial script, that script doesn't intergrate with vbulletin.

otherwise it looks awesome

Ron1n
06-21-2005, 01:37 PM
Find:
$form .= '<input type="submit" name="submit" value="Checkout">';

Place below:
$form .= '<input type="hidden" name="notify_url"
value="http://www.domain.ext/dir/purchase.php?do=ipn">'

That will get it working with multiple IPN, so you can now remove whatever you had on your paypal account. I didn't notice this before, it was a good catch. Thanks for bringing it to my attention.

I think I will just build this into the next script, it makes it seem so much easier.

PixelFx
06-21-2005, 03:44 PM
no problem :) I had to find something. Tech support was really friendly at paypal.

Question: If I change purchase.php to products.php will it effect the script at all?

Suggestions: ? Does this hack allow you to select a file from location on your server? since the attachment system on php is max 2 megs? and if so are there any restrictions to file size.

Virtuosofriend
06-21-2005, 04:27 PM
Nice hack Ronin :)

Ron1n
06-21-2005, 05:52 PM
Nice hack Ronin :)thanks m8

Ron1n
06-21-2005, 05:56 PM
Question: If I change purchase.php to products.php will it effect the script at all?You need to change *purchase.php* in every template to *products.php* and you need to change the same thing in the products.php page, order.php page, and purchaseadmin.php page if there are any instances of it in those pages. * = ANYTHING, it does not mean a literal *.

Suggestions: ? Does this hack allow you to select a file from location on your server? since the attachment system on php is max 2 megs? and if so are there any restrictions to file size.
I would change this so that it will allow you to link to a file. However, it wouldnt be secure. Anyone could just share the link. The way vBulletin actually does theres is each user has a unique link plus you have a directory you must log into in order to download. I dont plan to do something like that for this hack because it is just too in depth. I might make it so you can read in a file located on the server and put it into the database, but I might just make it so you have to link. Reading a file into the database would make it more secure, but it would also have some drawbacks if you had some files larger than 12 megs.

Edit: On a second thought, I might just create temporary files on the server so that the link will work for -- say -- 15 minutes, and after that the files will be deleted. That would have a lot of bugs though.

Here are the options, tell me which you would like to see:

- just link to a file (not secure)
- link to a file and read it in (secure, but wastes MYSQL space)
- you link to a file, and when a user downloads the script it creates a temporary file (many probable bugs depending on the user + server)

Madmax4321
06-22-2005, 07:28 AM
Find:
$form .= '<input type="submit" name="submit" value="Checkout">';

Place below:
$form .= '<input type="hidden" name="notify_url"
value="http://www.domain.ext/dir/purchase.php?do=ipn">'

That will get it working with multiple IPN, so you can now remove whatever you had on your paypal account. I didn't notice this before, it was a good catch. Thanks for bringing it to my attention.

I think I will just build this into the next script, it makes it seem so much easier.


will adding this allow it to be used alongside paypal donations ??

Ron1n
06-22-2005, 08:41 PM
will adding this allow it to be used alongside paypal donations ??
i'm not sure what you mean by 'alongside paypal donations'... but it shouldnt interfere with any other scripts you have set up

Madmax4321
06-22-2005, 08:44 PM
sorry i meant cloudrunners paypal donation hack can they work together with 1 ipn set at paypal ??

Ron1n
06-22-2005, 09:54 PM
sorry i meant cloudrunners paypal donation hack can they work together with 1 ipn set at paypal ??
here you dont have to set any IPN at paypal

PixelFx
06-22-2005, 10:14 PM
You need to change *purchase.php* in every template to *products.php* and you need to change the same thing in the products.php page, order.php page, and purchaseadmin.php page if there are any instances of it in those pages. * = ANYTHING, it does not mean a literal *.

I would change this so that it will allow you to link to a file. However, it wouldnt be secure. Anyone could just share the link. The way vBulletin actually does theres is each user has a unique link plus you have a directory you must log into in order to download. I dont plan to do something like that for this hack because it is just too in depth. I might make it so you can read in a file located on the server and put it into the database, but I might just make it so you have to link. Reading a file into the database would make it more secure, but it would also have some drawbacks if you had some files larger than 12 megs.

Edit: On a second thought, I might just create temporary files on the server so that the link will work for -- say -- 15 minutes, and after that the files will be deleted. That would have a lot of bugs though.

Here are the options, tell me which you would like to see:

- just link to a file (not secure)
- link to a file and read it in (secure, but wastes MYSQL space)
- you link to a file, and when a user downloads the script it creates a temporary file (many probable bugs depending on the user + server)

I was just thinking, as far as attachment system goes, just to split up download into pieces with winrare or something .. does your system allow for multiple attachments with say one product in this case? just an idea .. (thinking outloud)

PixelFx
06-22-2005, 10:16 PM
sorry i meant cloudrunners paypal donation hack can they work together with 1 ipn set at paypal ??

from what paypal said to me this system makes it possible to bypass and yet still use the ipn system on your paypal account. its just the url is controled in the script rather than punching it into the url location on paypal.

Its accually a much better way and still secure :)

Madmax4321
06-22-2005, 10:53 PM
cheers guys that makes life a lot easier ;)

Ron1n
06-23-2005, 01:11 AM
from what paypal said to me this system makes it possible to bypass and yet still use the ipn system on your paypal account. its just the url is controled in the script rather than punching it into the url location on paypal.

Its accually a much better way and still secure :)Please, try to make sense.

from what paypal said to me this system makes it possiblewhat system?

still use the ipn system on your paypal accountthere is no ipn system on your paypal account, its just a configuration variable

its just the url is controled in the script rather than punching it into the url location on paypal.What is?

If your asking how to have the IPN thing defined in the script, that has already been shown.

Madmax4321
06-23-2005, 08:25 AM
hes just explaining that there is no need to set ipn url in your paypal profile options at paypal because the script's returns the values itself :)

btw how far is final away now ??

grains
06-23-2005, 06:31 PM
this seems real cool....cant wait for final....scared to install it with bugs....lol

grains
06-23-2005, 06:35 PM
are we supposed to make the changes made in fix_list_six or have they already been made to the files?

grains
06-23-2005, 06:43 PM
I will continue adding them into txt update files until I make a general release. This just make it so ppl dont have to keep uploading new files since the changes are only take about 2 seconds to make.


nm...found the answer.

PixelFx
06-23-2005, 11:29 PM
hes just explaining that there is no need to set ipn url in your paypal profile options at paypal because the script's returns the values itself :)

btw how far is final away now ??

Couldn't of Said it better my self, :P Remind me not to post when I've been awake for 48+ hours str8.

Bernd
06-24-2005, 02:12 PM
Two errors here afting fixing the mentioned issues in the txt.

Invalid SQL: INSERT INTO ph_order (`userid`,`username`,`itemid`,`itemname`,`itemtype `,`productid`,`productname`,`price`,`quantity`,`st art`,`length`,`active`)
VALUES('2','name','','','service','1','Test 1','','','number','','1')
mysql error: Unknown column 'start' in 'field list'

mysql error number: 1054

Script: xxx/purchase.php?do=ipn

Invalid SQL: SELECT `membergroupids` FROM user WHERE `id`=''
mysql error: Unknown column 'id' in 'where clause'

mysql error number: 1054

Script: xxx/purchase.php? + a whole bunch of numbers ;)

This happens after purchase..the rest seems to work fine.
Is the any fix for the above mentioned issues? I've searched the thread but nothing came up.

PixelFx
06-25-2005, 11:42 PM
Two errors here afting fixing the mentioned issues in the txt.

Invalid SQL: INSERT INTO ph_order (`userid`,`username`,`itemid`,`itemname`,`itemtype `,`productid`,`productname`,`price`,`quantity`,`st art`,`length`,`active`)
VALUES('2','name','','','service','1','Test 1','','','number','','1')
mysql error: Unknown column 'start' in 'field list'

mysql error number: 1054

Script: xxx/purchase.php?do=ipn

Invalid SQL: SELECT `membergroupids` FROM user WHERE `id`=''
mysql error: Unknown column 'id' in 'where clause'

mysql error number: 1054

Script: xxx/purchase.php? + a whole bunch of numbers ;)

This happens after purchase..the rest seems to work fine.
Is the any fix for the above mentioned issues? I've searched the thread but nothing came up.
I'm looking forward to the next release or update :)

King Kovifor
06-26-2005, 06:22 PM
CinVin Products.php pictures...

Ron1n
06-28-2005, 06:01 AM
Two errors here afting fixing the mentioned issues in the txt.

Invalid SQL: INSERT INTO ph_order (`userid`,`username`,`itemid`,`itemname`,`itemtype `,`productid`,`productname`,`price`,`quantity`,`st art`,`length`,`active`)
VALUES('2','name','','','service','1','Test 1','','','number','','1')
mysql error: Unknown column 'start' in 'field list'

mysql error number: 1054

Script: xxx/purchase.php?do=ipnOk, change start to date - tell me if that helped.

Invalid SQL: SELECT `membergroupids` FROM user WHERE `id`=''
mysql error: Unknown column 'id' in 'where clause'

mysql error number: 1054

Script: xxx/purchase.php? + a whole bunch of numbers ;)

This happens after purchase..the rest seems to work fine.
Is the any fix for the above mentioned issues? I've searched the thread but nothing came up.Change id to userid

released :D

Bernd
06-28-2005, 08:05 AM
purchase.php?do=reciept&tx= + NUMBERS

ends up being a blank page. I don't receive an error notification.

jugo
06-28-2005, 11:31 AM
?? Can we add custom fields to the order form?

Ron1n
06-28-2005, 01:12 PM
purchase.php?do=reciept&tx= + NUMBERS

ends up being a blank page. I don't receive an error notification.Look in your logs, copy and paste the two longs associated with that specific 'NUMBERS' string.

Also... answer these questions:
- is the order created
- is there a ' in the product name/ item name

I cant see why you would get a blank page... unless its not communicating with paypal and times out... or if your missing a template. The whole blank page doesnt make much sense. You can do some debugging and add some echo "[reached point:a]"; statements (but use different letters), and tell me if it dies at some point. This will help me track the problem.

?? Can we add custom fields to the order form?Be my guest!

jugo
06-28-2005, 02:50 PM
When will you have an installer for this ron1n. My brain hurts... lol

Ron1n
06-28-2005, 05:18 PM
When will you have an installer for this ron1n. My brain hurts... lol
it doesnt really need one... its a simple install

yoyoyoyo
06-30-2005, 12:33 AM
Thanks for the updated file. I installed it on a brand new install of VB 3.0.6, and it gave me a few errors when I ran the MySQL queries. I ran them one at a time as listed.

When I entered the query:
ALTER TABLE `ph_settings` ADD `return` VARCHAR( 50 ) NOT NULL ,
ADD `notify` VARCHAR( 50 ) NOT NULL ;
I got the following error:
An error occurred while attempting to execute your query. The following information was returned.
error number: 1060
error desc: Duplicate column name 'return'

when I ran this SQL query:INSERT INTO `ph_settings` VALUES ('', 0, '', '', 0, '', '');
I got the following error:An error occurred while attempting to execute your query. The following information was returned.
error number: 1136
error desc: Column count doesn't match value count at row 1

Try deleting the tables from your database and redo the sql queries as listed in the zip file and you will see what I mean.

Also I was a bit confused by the file name "includes_mysql_edit" but I soon figured out I needed to edit FORUM/includes/db_mysql.php

I am still getting taken to the paypal page even if the item is marked as FREE. Will this be changed in a future version?

Thanks again.

PixelFx
06-30-2005, 04:50 AM
I got the same errors when I installed 1.0c on vb3.0.7. Other than the few errors above so far so good, do you want me to post screenshots later?

When I got to click ok on settings edited, it gives me a phrase error:

Can Note Find Phase "Settings Edited" .... you weren't kidding when you wait phases not setup yet.

where do I read in database to know what phrases to setup ?

Madmax4321
06-30-2005, 04:54 PM
hi im now getting this error:

Warning: fopen(00H1682458552343F.datatrans): failed to open stream: Permission denied in /purchase.php on line 311

Warning: fputs(): supplied argument is not a valid stream resource in /purchase.php on line 312

Warning: fclose(): supplied argument is not a valid stream resource in /purchase.php on line 313

how do i fix this one and no info goes into db.

another thing i noticed is i get no ipn callback but if i look @ whosonline i see guest purchase.php?do=ipn viewing no permission message do i need to allow guests to view forum for this to work?

the reciept url returns np and says you can download from members area shortly etc and i get success message in log files but no ipn logs.

have you a solution try ??

Ron1n
07-01-2005, 09:18 PM
@yoyoyoyo

ALTER TABLE `ph_settings` ADD `return` VARCHAR( 50 ) NOT NULL ,
ADD `notify` VARCHAR( 50 ) NOT NULL ; found its way into my description - removed and reuploaded

I am still getting taken to the paypal page even if the item is marked as FREE. Will this be changed in a future version?Probably not - i just wont allow free items. I mean, I dont know. I wont be updating this POS anytime soon though, I have real work that is taking over my life and doesnt let me have any free time.

@PixelFX

Search the admin file I provided for the phrase 'redirect' without the ''

@Madmax4321

1. The fopen, fputs, fclose is all permissions errors on your system or it cant find the directory. You just have to chmod + make sure the file exists.

2. The URL reciept just lets you know the transaction was OK from the users end, basically it lets you debug. :) The reciept should never submit information into the database because users can spoof the reciept (thats paypals fault, not mine). The IPN, however, doesnt seem to be exploitable.

3. The IPN problem.. hrm. There shouldnt be a problem with guests viewing the purchase.php file - I didnt put anything there to stop them. Have you tried accessing purchase.php as a guest? If you can, then it should be OK. If you cant, I dont know which settings you changed to make it like that but I am pretty sure its not my code. If guests can view it, then please fetch your server logs for me and check to see what error was created.

There is now a fix list for version 1.0c.

Madmax4321
07-01-2005, 09:34 PM
as logged out i cannot access the purchase.php so im guesing its my usergroup settings i changed when started to build my forum.

will revert it all back and try again.

one thing i would note is the db colums notify & return arnt big enough my urls dont fit in them :)

i changed them to VARCHAR( 75 ) might be worth adding to fixlist

Ron1n
07-02-2005, 01:51 AM
as logged out i cannot access the purchase.php so im guesing its my usergroup settings i changed when started to build my forum.

will revert it all back and try again.

one thing i would note is the db colums notify & return arnt big enough my urls dont fit in them :)

i changed them to VARCHAR( 75 ) might be worth adding to fixlist
lol, yea - i will in the next one. wtf is your domain if it is longer than 50 chars?

http://imabigloserwhoisfat.com/forum/purchase.php?do=ipn is 50 characters long...

The Geek
07-02-2005, 07:26 AM
here is a modified purchase.php that fixes several security issues. I dont know if it takes care of all - just some of the obvious ones I found. Hope I havent broken any functionality in the process ;)

yoyoyoyo
07-02-2005, 11:34 AM
here is a modified purchase.php that fixes several security issues. I dont know if it takes care of all - just some of the obvious ones I found. Hope I havent broken any functionality in the process ;)cool, thanks!

sketch42
07-13-2005, 05:47 AM
what phrases are missing?? or where can i find the missing phrases(what file??)

****EDIT****
also is there a way to add a item called Goods. because i want to use this to sell actuall items like say a dvd burner or something. and can you have multiple pages?

redspider
07-16-2005, 09:26 PM
how can I fix the phrases problem ? like
Could not find phrase 'Name not Specified'.
Could not find phrase 'Settings Edited'.

sketch42
07-17-2005, 01:34 AM
FULL RELEASE!

**ATTN**
USE THE FIX LIST ---> AND MAKE SURE YOU HAVE COMPLETED EACH STEP BEFORE INSTALLING. IF YOU HAVE ALREADY INSTALLED, JUST MAKE SURE YOU DO THEM SOON.

For those of you with other versions installed please upgrade using the upgrade_OLDVERSION_NEWVERSION.txt and everything will workfine.

READ ALL OF THIS BEFORE POSTING AND BEFORE DOWNLOADING:
This is not a beta anymore, but it is for capable, expirienced users only. This can be used as a final product, but it is not meant to be a final product. Users will proabably want to add some features for their own forum to meet their unique needs.

Overview:
This is a purchase/member area hack for vBulletin that is integrated with paypal. It comes with no warrantee, no installer, and limited support. It has been tested on all 3.0.x versions and is working (for the most part).

Bugs:
- I did not include admincp phrases
- There are problems when usernames contain '

Suggestions:
- Custom order fields

Notices:
- There is no support extension, but this hack does automatically add users to a new usergroup if you want it to, and therefore you can have a support forum for your users who have actually purchased items.

known issue

PixelFx
07-17-2005, 04:02 PM
can someone add the phases as addon for this? or point me in the right direction to add/create them my self?

axi
07-17-2005, 04:22 PM
anyone got screenshots

micheal332001
07-17-2005, 05:47 PM
how can I fix the phrases problem ? like
Could not find phrase 'Name not Specified'.
Could not find phrase 'Settings Edited'.


I have the same problem if anyone has these could you please put them here
so i can try this system out.

Nice work as fare as i can tell

sketch42
07-17-2005, 06:06 PM
I have the same problem if anyone has these could you please put them here
so i can try this system out.

Nice work as fare as i can tell

look 3 posts up at the authors description and youll see that he never included the phrases

micheal332001
07-17-2005, 06:23 PM
So how are we to use this if we dont know then.

Can you help im new at this vbulleting stuff.
I do programing of php but woking with phrases
Is all new to me please help

sketch42
07-17-2005, 07:31 PM
So how are we to use this if we dont know then.

Can you help im new at this vbulleting stuff.
I do programing of php but woking with phrases
Is all new to me please help

it doesnt need the phrases to fuction actually, all the phrases do here are confirming whether or not an action was successfull or not but is not needed to run the action itself

micheal332001
07-17-2005, 07:41 PM
But when i try to add a product it will not add it.

WhisperPntr
07-21-2005, 11:52 PM
michael, did you mark the product as active? EVERY product must be marked as active in order to be added, as well as have both descriptions filled. If in doubt, fill in everything and then edit them later.

as for the script itself
I'm still having a few problems with paypal IPN. Granted I'm using sandbox, however I have been told that there are not that many differences between live and sandbox.

The receipt goes through perfectly as well as the order, but the IPN address is not being called. At all.

There are logs for datastores but not .ipn. Calling ipn manually from the paypaltest.com page also stores a .ipn file.

Did anyone have this issue and was anyone able to resolve it?

Madmax4321
07-22-2005, 07:03 PM
michael, did you mark the product as active? EVERY product must be marked as active in order to be added, as well as have both descriptions filled. If in doubt, fill in everything and then edit them later.

as for the script itself
I'm still having a few problems with paypal IPN. Granted I'm using sandbox, however I have been told that there are not that many differences between live and sandbox.

The receipt goes through perfectly as well as the order, but the IPN address is not being called. At all.

There are logs for datastores but not .ipn. Calling ipn manually from the paypaltest.com page also stores a .ipn file.

Did anyone have this issue and was anyone able to resolve it?

yes i have had same problems the receipt returns but the ipn never does.

Mythotical
07-23-2005, 04:52 PM
My problem is this, I add a product, ok it goes through now, but nothing shows up when I go to add Item nor does it show up on my product listing. Any help with that would be much appreciated.

Thanks
Myth

Mythotical
07-23-2005, 05:47 PM
Ok just checked a database error, its not even inserting the information, here is what I got in an email concerning entering the information:
Database error in vBulletin 3.0.7:

Invalid SQL: INSERT INTO ph_file(`name`,`type`,`size`,`file`) VALUES('Traveller.zip','application/force-download','1484578','PK\0\0\0\0??2c x2\0\0??\0\0\0\0Do Not Upload/logo.psd?\\wXS???7;!?!(J؎@r?YI\0AA??jH.!?eਫ ???:k]u?٪?:k??Z+{??/֯U??X??Z??{Ö?k?????|xΛs?y?{ޓ{?y2U~!@? d?J?0?>Dao?*;?B!?p\0$?C?b ?_&??Iqۋ/m\\?,ݸjz5!??E?גRk?m%???az?99??/?Dq ????\\~?U?U?Fذ?}??#*?r]Tj
+?FQc??0??Sc2?튚?(??R?)`g??8???29J??&? (?F??8N?MW?(H?l?????
?ê?????????????r_? F?}?١?I0ۣ]N??cv+?`u,f>֔Y??䨨\\?tڦ8V??HD?iy?3af??\'?kr???i??I?H ?X+F?V?G?U?u??R+??^a?&??U\'?k3??;???i?f{Cd+?ă8e~?)C?Bm?4?+?b1?(quN~ ?D9?Bg????Tۓxm?????Ö\"??? |i?\0-B?B,I??|~ \'.?6>r-:C???>E|T??(???>Zh???I?qh???????V???z3L???#7W?n?:??NOq:
:?J ???r??T??QT)Qf?2U?L?L\"D?*b-+?^??m?;4f-??3C)?fddJ?
>?rI?J?f„?g
??>[????q???O.y?Xq?\"?f?+$?V
??{??V`f???L
?????8m0m)nkZ?jӒW?6???
?A?Iv[??p UX?A?١?X?????`?sW ?y2W,?Æ?>?˄\\?\\??Q???&??? ??H??A])>C9lB?P?S(Qf?$|_?b5_?O??$r???????????]X??O?\0??\\8W?o????
???xl?/?Jڵ,i??[?????b??
???+?-?+v?? %2??+??%|??m??B?u鈸??? 2b?D??L?\'?? b????
aq?TFP9Ne|??THPA?%la?P??TDPGJPN??:r1?R? ? r?’?r?? ?J *#(?#?:r? ?
*\"(a??D?G%\\X?\\X?\\ Wʕq?\\???.*??\".,c??J???P?x???? X?=3$??M,R??*?4C??
Q?&C ?dqF?f??E???o?қ?/?{??Um??????????Ze???6K????? z?8?j *?H?hK7-????e??\'?pޫS????5???kz?Ki?? ? n??-x??O?? ?<A܂\'?[?q ? n??-x??O?? ?<A܂\'?[?q ? n??-x??O?? ?<A܂\'?[?q ? n??-x??O?? ?<A܂\'?[?q ? n??-x??O?? ?<A܂\'?[???j?G??u?Q?Q?)?L?Ϯ;? R?4|w0??hB?Xູ?M ?;?5?8?i܅???3???a@???????(??|H??\0??J????\ \????7q-???#&hB3?????[?o?[????knX[È?j?wͱ!; ĈF????Ap??5R??5?v!d??qG?GN?+w?u?3 ?????-x?~?+????7;?F@, ??,N?ΞW6T?,/?:P?0?\"??c????nr?rG˱?a15??i?+???hv?A?ً?9v??8TB;?щ Avz ?t??ⴶb?,6??`??N?3
q?<?????? 3c6????E?+X?2˥?spI?IO??_^??i3e ,+?ߚ?k?c+84??Q?ѷ??h1h??8??YE?9e?0?+????? o̔?k?Y?lȢ??r????ի0????Fvku?2=q??Er?]?^M|}-f????X??;?2q,#L?K\\v???? nqE[u?$uu????ցf?/???[??l!??7?6?????R?8,&<}p?5Z?5?0O??Ps??P 0??λ{&!+????_k???!??/?avXh??7V;?8?uPY%?\'?%d???P??w????????u&3,p>g?Τ??a??*\'^??؟Xe??a?,???&???+A&L#?Y??V?>??ƶ?a? V[ߢ_֢?/Jm?\'???Uۍ???2NVm???|????t??d՘??Z3???.?5??? ¿|o]???=CB?5??ӳ,??c??ͼ?y\0l{??Kͼ?%?\\?}?z??zB?z i?? ?6Oh?O????qwM?᤻?$ϛ?<??c???r???6l???`??
3C?bXe?n?Yg .;???Ӭ

Now explain that and how I can fix that if you would be so kind.

Mythotical
07-23-2005, 05:59 PM
Currently I am having to go into the database and manually insert the information, but I can't insert the download location as of yet, still working on that. Once this problem is fixed I will be able to do this from the ACP.

micheal332001
07-23-2005, 11:14 PM
Hi there

I had someone test the paypal out for me on this and this is what it put in the batabase


1 316 USERNAME 0 service 2 Pnmmleague module 0 0 1122159630 0 2

As you can see here it is missing a few bits of info like
itemid itemname quantity

As you can see here with itemid it put in the default 0
itemname it did not put in any thing
And quantity it put in the default in for that too 0
also this friend that tested this choose the license not a service but it put it in as a service

Is there any fix you have done for this or some thing i can do.

WhisperPntr
07-24-2005, 03:56 PM
Thus far I have succesfully added additional payment options as well as an option to choose a CC processing fee. I'll be trying out a script that will use sendmail to notify my personal paypal payment has been made.

As for .ipn, it posted in sandbox when I used an http:// address and also when I used The Geek's purchase.php mysql injection fix. Testing on sandbox however always returns an invalid response and I'm going to switch back to https:// before troubleshooting the code that is used.

This code is great but definitely needs lots of tuning to suit your needs.

WhisperPntr
07-24-2005, 11:48 PM
I finally got it verified. THE GEEK'S fix basically made the item number different than what was needed.

to fix it replace The Geek's original code

//added by The Geek to remove the SQL injection security problems
globalize($_REQUEST,array('do'=>STR_NOHTML,'product'=>INT,'id'=>INT,'act'=>STR_NOHTML,'perf'=>STR_NOHTML,'tx'=>STR));
globalize($_POST,array('license','service','url'=>STR,'txn_id'=>STR,'custom'=>STR,'item_name'=>STR,'item_number'=>INT));


With the following
//added by The Geek to remove the SQL injection security problems
$do = $_GET['do'];
if (($do != 'ipn')&&($do != 'debug')) {
globalize($_REQUEST,array('do'=>STR_NOHTML,'product'=>INT,'id'=>INT,'act'=>STR_NOHTML,'perf'=>STR_NOHTML,'tx'=>STR));
globalize($_POST,array('license','service','url'=>STR,'txn_id'=>STR,'custom'=>STR,'item_name'=>STR,'item_number'=>INT));
}


Not eloquent but it works. Now on to solve why the item information won't be entered into the database

And for those who don't see the line, Basically this was an sql injection fix. Quite handy imho.

WhisperPntr
07-25-2005, 02:24 AM
Well I have fixed the item information however it required rewriting most of the insert query in the do='ipn' section. Actually so much of purchase.php has now been rewritten that it's hard to explain or do a copy and replace anymore, especially since I plan on capturing a lot more information.

But if anyone still has issues with it I may be able to help.

And lastly if ron1n and WhSox21 don't mind I may endeavor to post a script based on their works in the future.

If anyone is interested it is basically an art (or design) based script that involves ordering, viewing and troubleshooting art commissions. It will also tie into coppermine.

Of course if they are discouraging the promotion of edited works based on their code I will continue working in secret :)

Ron1n
07-28-2005, 11:46 PM
And lastly if ron1n and WhSox21 don't mind I may endeavor to post a script based on their works in the future.If you want to just tell me your plans and I'll see if its OK. I'll be releasing something similar to this in about a month that supports modules (payment options) and more types of products. I sorta rushed this thing into public development and in doing so looked over some things. I am slowly but surely hacking away at my other projects and will get back to this soon.

msn: ronin@elitecoders.org

akanevsky
08-01-2005, 12:25 PM
Screenshots Please?

EasyTarget
08-01-2005, 10:13 PM
Posts with screenshots:
https://vborg.vbsupport.ru/showpost.php?p=668251&postcount=37
https://vborg.vbsupport.ru/showpost.php?p=726354&postcount=89

psalzmann
08-05-2005, 06:41 PM
Excellent hack. Will come in very handy for our product.

Quick question, during the script (do == "receipt")..

I noticed (when you go down a bit further in the code).. this:


$DB_site->query("UPDATE user SET `membergroupids`='".$secondarygroups."' WHERE `userid`='".$user[0]."'");


What exactly is that doing? I'm aware it's doing something with the membergroupids, (usergroups) but what exactly is the purpose of this?

For example, I'm going though the code, making it to my own liking (ie: free products just insert the order info, and allows the user to download instantly, etc). But was just thinking:

-- I'm logged in as Admin, and I have full usergroup access. Hence the fact that I got a bit worried when I noticed your code is fetching existing groups and updating the user profile with custom ones.

Could you please confirm what this is doing exactly? Since I haven't seen anywhere in the admin section where this product/order system you created can "upgrade" a users group permissions after an order. I'm sure this is what is going on.. but if possible, please advise how it works.

If I wanted to make usergroup = 3 (non-customer) into usergroup 6 (valid customer) after the PAID order procees what should I be looking for?

Thanks in advance.

Regards,

Peter

psalzmann
08-06-2005, 04:17 AM
Sorry, nevermind last post. It's in the Admin > Settings. Must have overlooked it somehow.

Thanks for the great script. ;)

paul41598
08-09-2005, 11:23 AM
Will this work with the paypal merchant account setup as well? Using credit cards to pay through paypal?


Also the sql queries arnt working, Im getting errors. These two queries actually look similiar and prob are causing the errors


INSERT INTO `ph_settings` VALUES ('', 0, '', '', 0, '', '', '', '');

--
-- Dumping data for table `ph_settings`
--

INSERT INTO `ph_settings` VALUES ('', 0, '', '', 0, '', '');

paul41598
08-09-2005, 04:08 PM
I added some products, but nothing still shows up on this screen (screenshot)

psalzmann
08-09-2005, 05:52 PM
Yes, there is some interesting coding for VBPurchase. One of the biggest problems was the SQL insert of new orders. The base of that problem is where the code uses both $product for the order and then right below it again is another $product containing another array of information about the order.

If you just make the 2nd $product = .. to something like $productinfo = .. then both your arrays of $product and $productinfo will work, and no sql input should be lost... works fine over here.

When the developer mentioned in his description this script should only be used by experienced coders, I believe he really meant it. :)

Peter

Mythotical
08-14-2005, 01:51 AM
Ok problems now:

Got the file uploaded via admincp, but when I do a test purchase and everything goes fine, it redirects back to my site from paypal where the receipt should be but nothing is showing up. Ok next, IPN I assume isn't being sent, plus I can't figure out why it won't show a download box. Any help much appreciated.

Ronin, might wanna get your moderators on your site in check as I did not appreciate being banned for defending you in the shoutbox and needing to get a question answered.

psalzmann
08-14-2005, 02:51 AM
Ok problems now:

Got the file uploaded via admincp, but when I do a test purchase and everything goes fine, it redirects back to my site from paypal where the receipt should be but nothing is showing up. Ok next, IPN I assume isn't being sent, plus I can't figure out why it won't show a download box. Any help much appreciated.

Ronin, might wanna get your moderators on your site in check as I did not appreciate being banned for defending you in the shoutbox and needing to get a question answered.

Good one. I myself haven't even tested the return receipt back from paypal (too many other things to deal with) but a few of my customers have used the the system to accomplish the following:

1. I added "Usergroups" to the "Edit/Add Products". If a usergroup is defined with a comma for that product, he/she can click order. I set this as "FREE" for the "license" and made a "service" for "installation" at a rate of $20.00. This basically means, the software is free to order / download (for the proper usergroup allowed to download/order), and you can pay $20 to have us install it for you. With that in mind, the system was "modified" to accept FREE orders (and to NOT go to paypal.com and to present the "user" with a Download Now link if FREE) instead. If the "amount" is more than zero, it will take the user to paypal.com for payment before presenting the "download now" button/menu.

2. I have had about 4 payments of $20.00 since then. To me, this sounds like the "return receipt" from paypal is in fact working, that and I looked into the vblogs/ folder to find 4 actual files complementry from the "author" of the script which writes nice paypal IPN datafiles (make sure its working, check this folder and site read/write permissions to that vblogs/ folder.

To me, it sounds like it's working... (on my end) so I didn't really test myself to make 100% sure, but I plan on upgrading this store to meet my needs in the coming weeks.

I did receive your PM about help, I'm sorry I did not reply, however, at the point of actually downloading this, reviewing this and learning what was needed to change to complement my requirements, it turns out it's almost a new script from what I've added.

I plan on writing custom hooks to actually "license" the customer, send required emails off (this script lacks order and update emails about orders) and we're already looking into integrating this with the "HelpDesk" mod for support tickets. So, what I suggest for you is to simply play around with it, at least get your paypal working, review the "ARRAYS" in the script (since this is the base of many peoples problems in this thread).

It would help if you knew PHP, or could easily "read out" what the author has provided in the script for his concept and work from it.

I don't mind sharing some of the code I've written to fix the errors, but right from the beginning, this didn't work as I expected, so I started to tweak from there. Even if I wanted to help you, I really couldn't since my copy of the purchase.php is about 4 times larger than the original now, and would be a disaster in the least.

Let me know what you need help with, I could offer some assistance like the code for the updated paypal stuff. Also, keep in mind, I think for all this to work with paypal, you'll need to be verified and have required "account status" to use the ipn tools along side with the other features within the script.

BTW - It appears I just noticed a "bug" for my system. The bug is this:

I see 4 orders from the Admin CP > Purchase > Main. They are at the top of the page.

However, just recently, A customer said he placed an order, selected the $20 paypal payment option, and he never finished the transaction. Now, it appears (in my admin cp) that his order actually "Made it" into my successful orders table even though his payment wasn't completed. So to me, this is a bug perhaps when he goes to paypal, and doesn't complete the order and returns to the site from paypal (I think). But then I think thats not possible seeing how paypal doesn't have any "Links or buttons" to return the user back to the site unless they make payment. (the only other way to return the user to the site without paypals help is that user actually clicking BACK on his browser) which shouldn't update the order... so I'm not sure where this bug is coming from now... so I'll have to keep you updated. :)

Anyhoo, thats my story up till now. Any suggestions from the author could help me here too (in finding out why a paid order for "service" license at $20 is without payment is actually showing up in: Admin CP > Purchase > Main (top table is services) bottom is licenses.

Regards,

Peter

Mythotical
08-14-2005, 03:19 AM
I would appreciate the code help, even the updated paypal code stuff would be great.

Now I know a little PHP and I know for a fact that my receipt page is not calling the template right or something so I am investigating that. Now I figured a download box should appear once they have returned after paying but nothing is happening, I also wish to add a download now link for the free ones but no clue how to do that myself so if you could help there that would be great.

I have AIM, this is my AIM = WizO Myth, I also have YIM and MSN.

I wish to discuss more over that instead of just using the forums like this. BTW, thats alright about not responding to my PM at least you posted here to let me know.

Anyways, my email is mythotical (at) gmail(dot)com

Steve

Mythotical
08-14-2005, 03:29 AM
Here is a screenshot of what I see in my Members Area, the style licenses are listed as services and not licenses.

http://img.photobucket.com/albums/v245/Mythotical/test.jpg

Madmax4321
08-14-2005, 08:28 PM
i had same problems as you Myth except i never even get the paypal return to work the sole reason i scrapped my site first time round because couldnt get the thing to work.

Myth will probally agree i aint a noob at php but i cannot get it working with paypal.

any help would be great :)

Mythotical
08-14-2005, 09:03 PM
Max, once I hear back from psalz with the paypal fix then that should do it for me and you.

Stachel
08-15-2005, 03:03 AM
Who is using this in a live store?

Links?

justinkwaugh
08-17-2005, 04:57 AM
Here is a screenshot of what I see in my Members Area, the style licenses are listed as services and not licenses.

http://img.photobucket.com/albums/v245/Mythotical/test.jpg

Well, the problem lies when purchase.php does this:
$items = explode("-",$product[1]);
foreach($items as $temp)
{
$temp = explode(":",$temp);
$item = $DB_site->query_first("SELECT * FROM ph_item WHERE `id`='".$temp[0]."'");

either $items or $temp are wrong. I haven't debugged it at all to see which is incorrect, but $temp[0] ends up being empty so the item lookup fails (which ends up defaulting the item type to service). Is exploding a string to the same variable name kosher? I'm not much of a PHP coder, so someone else will have to tell me :)

WhisperPntr
08-22-2005, 12:35 AM
If you want to just tell me your plans and I'll see if its OK. I'll be releasing something similar to this in about a month that supports modules (payment options) and more types of products. I sorta rushed this thing into public development and in doing so looked over some things. I am slowly but surely hacking away at my other projects and will get back to this soon.

msn: ronin@elitecoders.org

Hi ron1n, currently I am developing for vbulletin 3.5 and am making progress, albeit slow.

While I am predicting it will be completely rewritten I will still mark credit thanks to your originality. If it is not completely rewritten I will assuredly ask for your permission before I release this hack.

I'll go ahead and submit and show what I've done when and after I've done it. For now it is only functional on 3.0.7. I have yet to migrate it with the new help support system I plan to integrate.

Also for clarification purposes when I meant that I am working in secret I meant that I would use it only for personal and private sites, not releasing the code to other individuals due to the dependency on your and other people's hacks.

I hope this is a respectable treatment to your work. If not let's talk more.

artist@wildfuryx.com

WhisperPntr
08-22-2005, 08:46 AM
I have already received a few pms and emails about the status. Please understand this isn't my hack and that I do not feel comfortable supplying more information without his permission.

I'm sorry if you have other thoughts in mind. I respect creativity first and foremost, so I hope you understand why I am hesitant to share someone else's brainchild that I only edited, even if a decent amount...

Anyways, Ron1n I am sending you another PM.

WhisperPntr
08-22-2005, 09:59 PM
Although I am still having problems contacting ron1n with my MSN (i can communicate with others strangely enough) we have discussed the status of vBPurchase.

Whenever I can actually see him we'll discuss the port to 3.5. ;) On that note I do have the full port of his original script completed. The bugs seem to be worked out and it installs nicely, but being the nature of these scripts I'm sure something will break on another user's incarnation.

If time is on my side I will also port over wh1tesox's current version of HelpDesk to 3.5. It'll be a quick and dirty port though, as he is already working on the 3.5 version. With further permission, I will most likely upgrade the script to his latest version But a big thanks to him and of course ron1n for letting me play as script monkey.

Also while it does look promising, I'm not making promises this will be released.

UOXDev
08-29-2005, 08:41 PM
Although I am still having problems contacting ron1n with my MSN (i can communicate with others strangely enough) we have discussed the status of vBPurchase.

Whenever I can actually see him we'll discuss the port to 3.5. ;) On that note I do have the full port of his original script completed. The bugs seem to be worked out and it installs nicely, but being the nature of these scripts I'm sure something will break on another user's incarnation.

If time is on my side I will also port over wh1tesox's current version of HelpDesk to 3.5. It'll be a quick and dirty port though, as he is already working on the 3.5 version. With further permission, I will most likely upgrade the script to his latest version But a big thanks to him and of course ron1n for letting me play as script monkey.

Also while it does look promising, I'm not making promises this will be released.

Status?

Deska
08-30-2005, 10:01 PM
Yes, I like to see this hack in vB3.5 :)

TPCComOld
09-13-2005, 04:17 PM
If there is anyone capable and interested installing a store on my site and integrate it into ny vb 3.0.7 and ensure that its working properly and that my users will be able to purchase downloads to their mobile phones like ringtones and graphics, and purchase products and subscription services using vbpurchase or any other store, I am paying! Either PM or reply to the thread. Please dont waste either our times if you cant make this happen.

rlamego
09-13-2005, 04:26 PM
Wow! This mod looks great but it does need some better instructions and a total clean up.
My paypal account doesn't list a token value...

TPCComOld
09-13-2005, 04:37 PM
Wow! This mod looks great but it does need some better instructions and a total clean up.
My paypal account doesn't list a token value...

The question is can you or anyone install the mod. It doesnt have to list a token value for me to pay does it?

psalzmann
09-13-2005, 05:00 PM
The question is can you or anyone install the mod. It doesnt have to list a token value for me to pay does it?

Yeah noticed that.. Paypal does have some new tools such as this token hash feature which (as followed in the authors install script) I followed each step by step and it worked no problem. It's even creating the proper IPN log files. If you do not see these from your paypal.com account, the chances are you are not setup as a Paypal Verified Business (account) and therefore will not be able to make use of this "token" feature provided to this exact script (however this can be EASILY re-written) along side with the results of IPN logs being stored in the db (vs file path).

The biggest problem (no disrepect whatsoever to author) with this script would have to be the part during paypal / ordering. As shown above, the coder has used $productinfo (or $product) .. (I cannot remember) for both arrays while inserting information into the DB. All I did to get it talking the the db properly was to carefully review the variables and what arrays were being passed around into the Query statements.

(If you notice, both arrays are on top of eachother.. one array is for the paypal response, the other is to build the array (I think) to pass into your mysql db).

Below you will find the code that works perfect for our use. As you'll see, there is a new customized email that is also sent to "you" and/or 1 other person you wish to send the order email notification to.

I am not supporting this hack, but I've noticed countless posts about IPN not working within this thread. Hopefully this code may shed some light on the subject.

<strong>Note:</strong> We have customized this script just a little to also support "product support renewals". Basically, this allows a user to download the software and they re-pay (later on) for a support "renewal". What it will do is let the user "pay to renew their downloads" and will only update the "expiry date" for that user (and will not insert a new order as it normally would). This simply prevents that 1 user from seeing many rows for the same product that expires using the original method. There is one basic if condition block in the code below that you can remove to reflect the original state of this script.




if ($_GET['do'] == 'ipn')
{
// BUILD PAYPAL REQUEST STRING
$request = 'cmd=_notify-validate';

foreach ($_POST as $key => $value)
{
$value = urlencode(stripslashes($value));
$request .= "&$key=$value";
}

// POST TO PAYPAL FOR VALIDATION
$headerx .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
$headerx .= "Content-Type: application/x-www-form-urlencoded\r\n";
$headerx .= "Content-Length: " . strlen($request) . "\r\n\r\n";
$sock = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);

if (!$sock)
{
$file = fopen($config['log'].$_POST['txn_id'].'.ipn', "w", 0);
fputs($file, "FAILED TO CREATE SOCK | ".$_POST['custom']." | ".$_POST['item_name']." | ".$_POST['item_number']."\n");
fclose($file);
}
else
{
fputs ($sock, $headerx . $request);

while (!feof($sock))
{
$result = fgets ($sock, 1024);
}

if ($result != "VERIFIED")
{
$file = fopen($config['log'].$_POST['txn_id'].'.ipn', "w", 0);
fputs($file, "UNVERIFIED (".$result.") | ".$_POST['custom']." | ".$_POST['item_name']." | ".$_POST['item_number']."\n");
fclose($file);
}
else
{
$id = $_POST['txn_id'];
$user = explode(":",$_POST['custom']);
$product = explode("|",$_POST['item_number']);
$productinfo = $DB_site->query_first("SELECT * FROM ph_product WHERE `id`='".$product[0]."'");
$items = explode("-",$product[1]);

foreach($items as $temp)
{
$temp = explode(":",$temp);
$item = $DB_site->query_first("SELECT * FROM ph_item WHERE `id`='".$temp[0]."'");

if ($item['type'] == 'license')
{
$type = 'license';
}
elseif ($item['type'] == 'service')
{
$type = 'service';
}
elseif ($item['type'] == 'renewal')
{
$type = 'renewal';
}

// is this a support renewal order?
if ($item['name'] == 'Support Renewal')
{
$DB_site->query("UPDATE ph_order
SET date = '".time()."',
length = '".$item['length']."',
active = '1'
WHERE userid = '".$user[0]."'
AND productid = '".$productinfo['id']."'
LIMIT 1");
}
else
{
$DB_site->query("INSERT INTO ph_order (`userid`,`username`,`itemid`,`itemname`,`itemtype `,`productid`,`productname`,`price`,`quantity`,`da te`,`length`,`active`)
VALUES('".$user[0]."','".$user[1]."','".$item['id']."','".$item['name']."','".$type."','".$productinfo['id']."','".$productinfo['name']."','".$item['price']."','".$temp[1]."','".time()."','".$item['length']."','1')");
}
}

$message = "Customer Payment via Paypal.com (ProductID# " . $product['id'] . ") was received: \n\n*************************\nProduct: " . $productinfo['name'] . "\nItem Name: " . $_POST['item_name'] . "\nItem Number: ". $_POST['item_number'] ."\nCustomer: " . $user[1] . "\nCustom: " . $_POST['custom'] . "\n*************************\n\nRegards,\n\nTeam ILance";

// Send e-mail to admin about new purchase via paypal
mail('????????????????????????????', '[ILance Store] New Paypal Order by '.$user[1], $message,
"From: ?????????????????????????\r\n" .
"Reply-To: $bbuserinfo[email]\r\n" .
"X-Mailer: PHP/" . phpversion());

// lets email one other staff / admin user about paypal (to be safe)
mail('??????????????????????', '[ILance Store] New Paypal Order by '.$user[1], $message,
"From: ?????????????????????\r\n" .
"Reply-To: $bbuserinfo[email]\r\n" .
"X-Mailer: PHP/" . phpversion());

$file = fopen($config['log'].$_POST['txn_id'].'.ipn', "w", 0);
fputs($file, "VERIFIED | ".$_POST['custom']." | [".$productinfo['name']."] ".$_POST['item_name']." | ".$_POST['item_number']."\n");
fclose($file);
}
}
fclose ($sock);
}


Let me know if this helps anyone.

Regards,

Peter

TPCComOld
09-13-2005, 05:28 PM
Peter,

I sent you an email. Can you take a look at it.

Creed
10-01-2005, 06:39 AM
Any plans to bring this to 3.5?

Nutz
10-09-2005, 12:43 PM
This would be great for 3.5 ;)

Thanks,
Mat

PixelFx
10-10-2005, 05:05 PM
This would be great for 3.5 ;)

Thanks,
Mat

I'd love to see this for v3.5.0 .. I'd even pay $45 to get it :P

Nutz
10-12-2005, 02:10 PM
Same ;)

Thanks,
Mat

hotwheels
10-12-2005, 05:10 PM
i just read this post, Did anyone actually get this to work correctly?

Nutz
10-12-2005, 06:26 PM
I never tried it on vB3.0.

Ron1n: Last Activity: 26. Sep 2005 00:03, Maybe some one else could take on this project or something similar to this system.

Thanks,
Mat

NemoTech
10-19-2005, 04:18 PM
I'd love to see this for v3.5.0 .. I'd even pay $45 to get it :P


Same I'd pay some money to get this hack

Omranic
11-15-2005, 08:22 AM
Very Nice
Need 3.5.1 version plz

Dark_Wizard
11-25-2005, 12:26 PM
I have been working on one for a bit now and does the same as this and all the others but more to my liking and includes support for building files on the fly from an svn repository in either a zip or tar format so the latest revision is in the file.

When I have it complete and an installer created I will let everyone know on vb-scripts.com

Poethik
12-20-2005, 06:31 AM
This hack is COOL AS HELL hahaha

Check it out! Live Demo http://www.rapchoice.com/forums/purchase.php

* I dloaded the hack
* Then I did all the modifications suggested
* I stopped Modifying after Page 8 of this thread
:)

browsehosts
12-20-2005, 07:09 AM
does this hack allow me to charge a user once per post in a certain forum section?

Poethik
12-21-2005, 12:30 AM
nope.

Rover416
02-07-2006, 03:20 PM
Was there anything like this created for 3.5.

It would be perfect for my new site.

DeMiNe0
02-07-2006, 04:16 PM
this would be awsome for 3.5

DementedMindz
04-22-2006, 03:50 PM
this would be awsome for 3.5


yeah it would be but ronin hasent been on

capi-lisa
06-23-2007, 01:06 PM
this is very good but is there a port to vbulletin 3.6.7PL or so

Centrix
07-21-2007, 03:34 PM
Couldnt find one...

I hope someone ports this, its a very good add on and I will be needing it soon

G3MM4
09-01-2007, 08:37 PM
I definitely need this soon but I'm running the latest vBulletin version which is 3.6.8... hopefully he will port this.

Unless anyone can tell us what www.vbadvanced.com and www.cinvin.com are using for their members/products section?

Centrix
09-26-2007, 01:00 PM
I would like to see a 3.6.8 version of this hack... I really need it

bartek24m
05-21-2008, 10:25 PM
yeah i also looking for a 3.6.8 version

G3MM4
05-22-2008, 04:09 AM
I would like to see a 3.7.0 release with the bugs ironed out.

tuaguild
07-07-2008, 08:46 PM
yeah everytime i try to bring up purchase.php in my browser it just shows a blank page in vb 3.7.2 i wish ronin would at least allow someone to port this to the newest version