Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> eCommerce
Author Message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Thu Feb 12, 2009 4:42 pm Reply with quote

Where multiple sites are concerned this is the method I use. I have taken this from a discussion at Only registered users can see links on this board! Get registered or login!

The way to handle multiple sites or just about multiple anything with IPN is to just use one IPN url that is a Controller. Then, that script determines the actual routing. For instance, in your Paypal IPN setup, you point Instant Payment Notification (IPN) URL to what I refer to as an ipnController script (example: ipnController.php). For obvious reasons I can't/won't reveal all my code Wink but in the ipnController.php script you examine various variables sent from Paypal and determine what to do. For instance, you could

Code:
switch ("$item_name") {

   case ('subscr_signup'):
      include ('ipnScripts/subscrSignup.php');
      break;
   case ('subscr_payment'):
      include ('ipnScripts/subscrPayment.php');
      break;
   case ('subscr_eot'):
      include ('ipnScripts/subscrEot.php');
      break;
   case ('subscr_cancel'):
      include ('ipnScripts/subscrCancel.php');
      break;
   case ('subscr_failed'):
      include ('ipnScripts/subscrFailed.php');
      break;
   case ('donation'):
      include ('ipnScripts/donation.php');
      break;
   case ('refund'):
      include ('ipnScripts/refund.php');
      break;
   case ('send_money'):
      include ('ipnScripts/sendMoney.php');
      break;
   default:
      include ('ipnppd.php');
      break;
}
You can just as easily check for a domain. I have found IPN to be completely reliable and very extensible/configurable. Your mileage may vary due to mental stability/configuration killing me
 
View user's profile Send private message
horrorcode
Involved
Involved


Joined: Jan 17, 2009
Posts: 272
Location: Missouri

PostPosted: Thu Feb 12, 2009 9:30 pm Reply with quote

Yes I have this live, Only registered users can see links on this board! Get registered or login!
I have to check the url again, Ill post back when I get to, just waking up. I need to read over this again too so be patient with me.
 
View user's profile Send private message
horrorcode
PostPosted: Fri Feb 13, 2009 4:38 am Reply with quote

Ok here are all the Urls...

Admin/Preferences/Site URL:http://www.horror-code.com/

Admin/CCart/Main CCart Settings/
URL to your LOGO:http://www.horror-code.com/logo.jpg - can be seen in Paypal
Return URL after purchase:http://www.horror-code.com
Return URL after cancel:http://www.horror-code.com

And obviously the paypal email is working lol, so it isnt that. One thing I noticed, in phpmyadmin the orders table is empty or has zero rows, not sure if that could be it Im assuming they arent populated until an order is placed.

My guess is something wrong in Paypal. I set this to use my real account and tested with another account with real money just to be sure it wasnt the sandboxing on the test account, but I noticed since I have the merchant account it shows some other options for return urls besides the ipn settings outside of the ipn settings(something like website payments or cart settings), anyone know about those? And yes I do have ipn turned on in paypal.
 
alien73
Involved
Involved


Joined: Sep 15, 2008
Posts: 352

PostPosted: Fri Feb 13, 2009 7:07 am Reply with quote

My guess is the code with buy now maybe Paypal changed some things... Have to take a look.
 
View user's profile Send private message Visit poster's website
alien73
PostPosted: Sat Feb 14, 2009 6:58 am Reply with quote

Just a heads up the your

Why Buy From Us? | Payments Accepted? | Shipping Methods? | Our Guarantee?

html pages have the Guitar Files in the title.......May want to change to your site name.
 
horrorcode
PostPosted: Sat Feb 14, 2009 7:20 am Reply with quote

Thanks I totally forgot Smile Maybe add some php to those to get the site url? Not sure if thatd work but Im gonna try to figure it out.

Also, I know the installers worked, after checking everything in phpmyadmin, but the installer andupgrade scripts still use connect and select_db, would those be updated the same way with global $db? They didnt return errors and all the tables look right so I dont think it matters too much, I guess I could just look over another installer to see.
 
alien73
PostPosted: Sat Feb 14, 2009 7:28 am Reply with quote

They would be updated the same.
 
horrorcode
PostPosted: Sat Feb 14, 2009 7:53 am Reply with quote

Thanks. This isnt exactly the forum for this question but, is it safe to use my merchant id as oposed to email, from paypal, for purchases etc? If so would it work the same if I used the merchant id in the email section in ccart? As Id much rather have people see the merchant id....
 
alien73
PostPosted: Sat Feb 14, 2009 8:37 am Reply with quote

I thought the merchant id was your PP email. Did they change something I'm not aware of?
 
alien73
PostPosted: Sat Feb 14, 2009 8:48 am Reply with quote

Never mind I see now.. Secure merchant id..
 
alien73
PostPosted: Sat Feb 14, 2009 8:49 am Reply with quote

Paypal states the following: So you can use it


A secure merchant account ID is a number that only PayPal can match to your real email address in your profile. Your primary e-mail address is never displayed, so it cannot be used by spammers.

If you choose a plain text e-mail address, however, it will be displayed in the button code. Anyone, including spammers, can copy this address for their own use.
 
alien73
PostPosted: Sat Feb 14, 2009 8:54 am Reply with quote

Just for the record: Those who want to now use their Secure Merchant id rather then your email.

Log into your Paypal account, click on profile and at the top you will see

Business: Your Company (you@test123.com)
Secure Merchant ID: XXXXXXXXXXXX
 
alien73
PostPosted: Thu Feb 19, 2009 10:08 am Reply with quote

CCart Pro (Paypal Shopping Cart) updated!

It now works smoothly with RavenNuke(tm) all versions!


Some new features.

1) Upload images for products and categories
2) Cached images(3 sizes) sm,med,lg along with category images.. Very Cool...............
4) HTML to XTML conversion,
5) Database conversion,
6) Block conversions,
7) Advanced editor in admin products add and edit...
Cool Many Bug Fixes
9) Code Cleanup
10) Database install scripts updated
11) Works with the latest versions of PHP and MYSQL
12) Moved all files out of root into modules/CCart

I will make an announcement once released.
 
horrorcode
PostPosted: Thu Feb 19, 2009 12:30 pm Reply with quote

*stares into the distance* Out of site, honestly. Now wheres that frigin donation box lol...
 
alien73
PostPosted: Thu Feb 19, 2009 1:40 pm Reply with quote

Thanks... I'm not sure how it's going to be released yet since we also have Merchant. I started the conversion just so people could still use it but ended up doing alot of fixes, additions :>)

It's still a Paypal cart so you use Paypal shipping calculations etc... I'm thinking about adding Paypal Web Payment Pro for a complete solution.
 
horrorcode
PostPosted: Thu Feb 19, 2009 4:23 pm Reply with quote

That would be awesome. I'm not too familiar with WPP though. The only need I see is a table for shipping info, or maybe have ipn report the clients Paypal email back for simple tracking.

As for the release, one may be better etc but like you said, at least people have another option now Smile

I'm a fan of both projects, but might end up going with merchant in the end. All depends on the release *date* really.
 
alien73
PostPosted: Thu Feb 19, 2009 6:21 pm Reply with quote

PWPP processes credit cards automatically and the customer never knows It's Paypal.
So CCart will need it's own shopping cart, shipping and delivery pages to work.

Donate some high potent coffee and the release will come quicker :>)
 
horrorcode
PostPosted: Thu Feb 19, 2009 10:52 pm Reply with quote

Never knew Paypal could do all that, hey now. More of a pay-as-you-go merchant account, I can see limitless useability of that system.

Coffee must be more of an aquired taste, but I guess the amount of soda I consume would add up... How do you take it?
 
alien73
PostPosted: Thu Feb 19, 2009 11:14 pm Reply with quote

Well, I like coffee plus soda. Pepsi is my favorite.. I'm hanging from the ceiling right now... Groovy
 
horrorcode
PostPosted: Fri Feb 20, 2009 12:26 am Reply with quote

Lol...pepsi is the best, dont have time to make coffee.. Just dont go falling on us.

Another idea for the updated version... Unless you already have, would be great to see the menus, various links, etc, admin global aware.
 
alien73
PostPosted: Sat Feb 21, 2009 9:09 am Reply with quote

I would like to get rid of the links and have a Store Policy page instead editable in admin.
 
horrorcode
PostPosted: Sat Feb 21, 2009 2:34 pm Reply with quote

Yeah, leave it to you to think of the good stuff Smile

Im just now starting to understand various strings, etc, or Id be trying to lend a hand.
 
alien73
PostPosted: Wed Feb 25, 2009 8:48 am Reply with quote

Thanks Horrorcode

It's coming together slowly Very Happy
 
horrorcode
PostPosted: Wed Feb 25, 2009 8:53 am Reply with quote

Good to hear. Can you believe were already 2 months into 2009....weird...

Gonna be a great year for us.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> eCommerce

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©