Paypal checkout module (it's done!)

turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Fri, 2005-06-03 12:36

As promised, attached is v0.1.4 of the module. Main changes since the previous version are:

  • Added configurable currency code to pass to PayPal
  • Added admin parameter to allow use of either normal 'live' mode for PayPal, or the testing sandbox (requires a Pay Pal developer account, which is free)
  • Made checkout module re-create the user's cart as fulfillment starts, so the user can navigate back to it if they want to.
  • Created return page for PayPal auto-return to get buyers straight back to the gallery.
  • More product/price option entries will be added as you fill up the standard 8 - there will always be at least 4 blank entries on top of whatever you last saved.
  • Changed selection of products in Stage 1 to be by a combo box instead of a full list - behaves better with lots of products and a large basket. There's an admin option to use either this method or the full table display from previous versions.

There's also a Readme file that outlines how to set up the module and your PayPal account to work together properly.[/]

 
highpulse
highpulse's picture

Joined: 2004-05-15
Posts: 45
Posted: Fri, 2005-06-03 21:06

Thanks and I will see if I can get time to install tonight. Thanks for the on-going improvements on an already great module.

Thanks!

 
highpulse
highpulse's picture

Joined: 2004-05-15
Posts: 45
Posted: Sat, 2005-06-04 23:23

I finally installed the updated checkout and it worked great. The read-me file was great, thanks!

I do have to say that when I was selecting the print sizes and quantity, it was confusing because the amount stayed on the screen for the sizes. I figured out that you need to "Save Changes" to register the quantity for that size, then select the next size. I did like it better the way it was before, sorry. Maybe it is just me.

Thanks for the update!

 
littletechgirl
littletechgirl's picture

Joined: 2005-03-15
Posts: 53
Posted: Sun, 2005-06-05 03:02

turnbulm, I had originally installed dleaberr1's module, tested it, and it worked great. I wanted to try out yours, so I uninstalled the first one, downloaded your latest build and installed it.

When I get to the configure screen, I do not see all that should be there. All I see is Company info and paper options (see attachments).

Is it just me?

Thanks!

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Sun, 2005-06-05 07:08

Kris,

This is strange - it looks like you still have some old files left over from the original module. A couple of things you can try to fix this:

1. Clear the template cache (Site Admin -> Maintenance -> Delete Template Cache)

2. If that doesn't work, then uninstall the module again - but this time also delete the 'checkout' directory from inside modules before you unpack the newer version.

If neither of these work, please can you post the size/date/time of the 'admin.tpl' file you have installed?

Good luck!

Matt.

 
littletechgirl
littletechgirl's picture

Joined: 2005-03-15
Posts: 53
Posted: Sun, 2005-06-05 13:13

Matt thanks so much! You are a genius, deleting the template cache did it. :)

Kris

 
g4m8i7

Joined: 2005-06-06
Posts: 6
Posted: Mon, 2005-06-06 04:58

Turnbulm, I've gotten the module installed, and it all works fine until I click the paypal button, which always sends me to an empty cart. Help!

Here's a link

Thanks in advance!

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Mon, 2005-06-06 08:18

g4m8i7 - the problem is being caused because you don't have titles set on your images. This shouldn't really be necessary, so I've made an adjustment to the form controller. If an item doesn't have a title set, the filename is set as the title for the purposes of the checkout.

 
g4m8i7

Joined: 2005-06-06
Posts: 6
Posted: Mon, 2005-06-06 13:10

Turnbulm, you rock, man!

Thanks very much for the help :D

it now works wonderfully :)

 
littletechgirl
littletechgirl's picture

Joined: 2005-03-15
Posts: 53
Posted: Mon, 2005-06-06 14:05

I have yet another question. The cart works GREAT though. I would like to make a couple of adjustments. The first and most major is, I actually liked the first version of the cart that listed the sizes available in a table and the user could just put in the qty wanted of each size all at once.

I think the 2nd with the drop down may be a bit confusing because they have to hit save, then go back and hit more sizes, etc.

How can I change mine back to the original?

Thanks,

Kris

 
g4m8i7

Joined: 2005-06-06
Posts: 6
Posted: Mon, 2005-06-06 15:50

I second that, Littletechgirl.

I want to offer prints by themselves, mounted prints, mounted and framed prints. Having the dropdown menu would make it rather cumbersome for the buyer! The table layout would be much more convenient.

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Mon, 2005-06-06 18:16

No problem - glad to help. It's this kind of feedback that helps make things more robust!

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Mon, 2005-06-06 18:21

Sorry - didn't notice the extra page of posts...

I think you should just be able to substitute the 'confirmphotos.tpl' file out of v0.1.3 to get back to the table-based layout, but it might cause some problems in the form controller. Give it a go and let me know.

The reason I did this was because of the size of the confirmphotos page if I had a few more options (I have 8 standard print sizes) and a fairly large cart, then it all became a bit overwhelming. A few people tried my version on my site before I uploaded, and they all agreed with the change - but that was with my set of 8 products.

I think I'm going to revisit this, as I agree that the table layout was better for sites with fewer products. It would probably be fairly easy to make an admin setting to determine the layout.

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Mon, 2005-06-06 18:30

Hope you spotted my deliberate error... the template to roll back should be 'selectproducts.tpl' and not confirmphotos

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Mon, 2005-06-06 19:07

I've just had a look at this, and discovered that because of another change you won't be able to use the 'selectproducts.tpl' from v0.1.3 (not least because it didn't exist in that version...)

As I thought, it was easy to put an admin switch in to choose the display method. I've updated the v0.1.4 posted on page 4 with a version that implements this. You may need to flush your template cache after installing this update.

 
littletechgirl
littletechgirl's picture

Joined: 2005-03-15
Posts: 53
Posted: Mon, 2005-06-06 20:13
turnbulm wrote:
I've just had a look at this, and discovered that because of another change you won't be able to use the 'selectproducts.tpl' from v0.1.3 (not least because it didn't exist in that version...)

As I thought, it was easy to put an admin switch in to choose the display method. I've updated the v0.1.4 posted on page 4 with a version that implements this. You may need to flush your template cache after installing this update.

you rock, you really do. Keep up the good work.

Now, all I need is to figure out how to make the option of emailing the order to me as an alternative to Paypal.

Any ideas? :D ;)

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Mon, 2005-06-06 20:17

You're not the first person to ask about this, and it's something I've been thinking about as well. Something like a "Pay by cheque" option instead of going to PayPal - get an email of the cart off to the site owner, then deal with payment (if necessary) by some other means.

If you were going to fir the email option into the process, where would it be? What information would you want to gather to go in the email? Are you still looking for product/paper and pricing information, or literally just an email of the list of items?

 
littletechgirl
littletechgirl's picture

Joined: 2005-03-15
Posts: 53
Posted: Mon, 2005-06-06 20:21

it could be all the exact info that is already collected just dumped into a txt file. I already have a php mailer in place (I think it still works. LOL) so all I need is to add the option to the cart options drop down, "Order Package", and the other one then changed to "Pay via Paypal".

It looks like someone started to do this here http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=29651

but I *think* he was going off the packagecheckout module.

Kris

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Mon, 2005-06-06 20:36

This is going a bit off-topic for this thread, so I'm going to start a new one. See here.

 
jmacdoug2005

Joined: 2005-05-29
Posts: 95
Posted: Wed, 2005-06-08 03:05

Is there any way to direct the info from this mod right to me somehow so I can process an order on my own CC machine? I own my own dig photo lab in NJ.

Jeff

 
debtman7

Joined: 2005-06-08
Posts: 2
Posted: Wed, 2005-06-08 16:53

Well, it looks like turnbulm is doing dev work on a windows box, I had to rename all of the files to be capitalized for us one good old case sensitive file systems :)

Also I'm doing some hacking on this, my goal is to make it more flexible using the custom fields extension. Basically I'm making this module check for certain custom fields on each image, and modifying its behavior accordingly. For example, if an image has a forsale custom field that has the value 'no' then that image can't be purchased. Or, it can check for 'product' and 'price' custom fields and if they exist, use those instead of the global settings.

These custom fields can be completely hidden from end user view, but would give the album owner the ability to custom price individual images or disable some images/albums for purchase. This is the easiest way I can think of to add this flexibility, it will be completely optional and really require no setup to use other than setting up the additional custom fields if you want to use them.

turnbulm, if you're interested in incorperating this I'll send you the code. I need to get this done ASAP for a client so I'm going to go ahead and make a verison that does this.

 
jmacdoug2005

Joined: 2005-05-29
Posts: 95
Posted: Wed, 2005-06-08 17:25

debtman7, you seem to be "the man". I would have a great intrest in the code myself.

Would that be OK with you?

Jeff

 
littletechgirl
littletechgirl's picture

Joined: 2005-03-15
Posts: 53
Posted: Wed, 2005-06-08 17:50

Yes, that sounds like something I would be really interested in as well. I am not great at coding yet, but if you need any other help, let me know :)

Kris

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Wed, 2005-06-08 20:50

debtman7 - yes, I would be interested in a copy of the code. My current main development (thinking towards version 0.2) is to do with product price lists - which will be based on per-item settings as you mentioned, but will also be inheritable from the parent albums. I'll see how yours fits with mine, and there may well be something I can use to save me writing it all!

I'm also planning an interim release sometime in the next few days (work permitting!) that will have a 'Checkout by Email' type option. This will plug into stage 2 of the process, so as long as your mod doesn't change too much here then it shouldn't be too hard to merge these branches.

btw - my coding is done on a Linux/Apache box, not sure what capitalization problems you're having. Please can you let me know, and I'll make sure the files are fixed in the next release?

jmacdoug2005 - I've held off on replying to your question about a CC module while I was thinking about this in more detail. My concern here is security.

There's no question that you could gather a CC number in a field in the checkout, then have it emailed to you, but the security on this scares me (as a site admin, being held responsible for the confidentiality of people's data).

Even if you had the whole site SSL protected, you still have to get the CC detail into an email and back to your mailbox. You're going to need to GPG encrypt that, and you're also going to need to worry about things like shared memory security and working/temp filespaces. You're also going to need to code something in gallery to actually do the encryption.

My conclusion - after much thought - is that it would be difficult to achieve the degree of security I would consider a basic necessity for doing this. I'm not prepared to code and release something that I believe isn't secure enough to handle people's credit card details.

OTOH - most card machine companies in the UK also have Internet processing gateways that can be used by businesses subscribing to their services. Does your card machine company have something like that? It may be easier to code the module to use that gateway in the same way as it currently uses PayPal.

 
jmacdoug2005

Joined: 2005-05-29
Posts: 95
Posted: Wed, 2005-06-08 21:41

Actually, I could SSL the site with no problem. Could we then have a script that will collect the information for the order including the CC and put it in a database table? I could then search the database for the order info including CC#s

At the same time, a plain informational email with order details (minus the CC info) could be set to me. This way the vital info is on my secure server and never is tranmitted through email.

Let me know your thoughts.

Jeff

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Wed, 2005-06-08 21:47

The problem there is that you are still relying on the security of the server, the scripts, and the database to keep the CC information confidential. At the end of the day, that server is an internet-facing device running web services with PHP - and there are PHP scripts on there that have access to the DB with the target information.

If it were my credit card, I wouldn't use a server that ran like that. That may seem excessive, but I'm paid to be paranoid and I see the results of those kinds of assumptions on a regular basis.

I'm not saying that you couldn't/shouldn't do it, just that it's something I'm not comfortable with myself.

 
jmacdoug2005

Joined: 2005-05-29
Posts: 95
Posted: Wed, 2005-06-08 22:16

What is the best way to attack this? I really want to process my own CCs. I guess I will contact my CC processing co tomorrow.

Let me know if you have any better suggestions.

Thanks,

Jeff

 
drhiii

Joined: 2003-04-27
Posts: 397
Posted: Thu, 2005-06-09 08:33

Hi All. Have read through all the great exchanges on the new checkout module and decided to give it a go this eve. I have a recent nightly snapshot installed. Here is as far as I got... when trying to install the Modules. Thought to post this FYI...

Checkout the cart using Paypal
Incompatible module!
Core API Required: 5.0 (available: 6.0)
Module API Required: 0.10 (available: 0.12)

 
g4m8i7

Joined: 2005-06-06
Posts: 6
Posted: Thu, 2005-06-09 12:14

Turnbulm, The IPN with checkout doesn't seen to work for me, it throws this message when i go to the IPN URL, and I get no notification in gallery itself of a purchase being made. But perhaps I'm misunderstanding how that's supposed to work.:

 
Security Violation

The action you attempted is not permitted.

Back to the Gallery
Error Detail -
Error (ERROR_BAD_PARAMETER)

    * in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 50 (gallerystatus::error)
    * in modules/core/classes/GalleryCoreApi.class at line 2144 (galleryentityhelper_simple::loadentitiesbyid)
    * in modules/checkout/IPN.inc at line 56 (gallerycoreapi::loadentitiesbyid)
    * in main.php at line 182 (ipncontroller::handlerequest)
    * in main.php at line 86
    * in main.php at line 77

System Information
Gallery version 	2.0-beta-3
PHP version 	4.3.10 cgi
Webserver 	Apache/1.3.31 (Unix) DAV/1.0.3 mod_gzip/1.3.26.1a PHP/4.3.10 mod_ssl/2.8.19 OpenSSL/0.9.6c
Database 	mysql 4.1.11-log
Toolkits 	SquareThumb, ImageMagick, Gd, NetPBM
Operating system 	Linux gap 2.4.29-grsec+w+fhs6b+gr0501+nfs+a32+++p4+sata+c4+gr2b-v6.189 #1 SMP Mon Feb 7 13:23:30 PST 2005 i686
Browser 	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

any ideas?

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Thu, 2005-06-09 14:51

drhiii, it looks like the APIs have been incremented again in CVS for some change or other. You can take a stab at just making the module compatible (change the required API versions in module.inc) and see if it works. Please let me know! I wasn't planning on making interim releases compatible with CVS, only with the most recent Beta release.

g4m8i7, where are you navigating to the IPN URL from? That URL is intended to be used only by PayPal to post back the transaction data asynchronously, and should never end up anywhere in a user's browser. I would fully expect that error if you tried to browse to the URL, as there is no transaction data being posted. Without the data the IPN handler can't update the transaction. If you have a look at the Readme file (separate download above) it mentions where you should set up the IPN URL in your PayPal account. Make sure you don't get the IPN and Auto Return URLs mixed up as they are very different things.

 
drhiii

Joined: 2003-04-27
Posts: 397
Posted: Thu, 2005-06-09 21:04

I understand and will give that a shot. My proogramming skills are minimal, but this is such a GREAT and badly needed module that I will dig in and see if I can make it go.

Wonderful work... thank you for your participation in this.

turnbulm wrote:
drhiii, it looks like the APIs have been incremented again in CVS for some change or other. You can take a stab at just making the module compatible (change the required API versions in module.inc) and see if it works. Please let me know! I wasn't planning on making interim releases compatible with CVS, only with the most recent Beta release.

 
debtman7

Joined: 2005-06-08
Posts: 2
Posted: Thu, 2005-06-09 21:05
turnbulm wrote:
debtman7 - yes, I would be interested in a copy of the code. My current main development (thinking towards version 0.2) is to do with product price lists - which will be based on per-item settings as you mentioned, but will also be inheritable from the parent albums. I'll see how yours fits with mine, and there may well be something I can use to save me writing it all!

I'm also planning an interim release sometime in the next few days (work permitting!) that will have a 'Checkout by Email' type option. This will plug into stage 2 of the process, so as long as your mod doesn't change too much here then it shouldn't be too hard to merge these branches.

btw - my coding is done on a Linux/Apache box, not sure what capitalization problems you're having. Please can you let me know, and I'll make sure the files are fixed in the next release?

Hmmm, maybe command line unzip is funky? All of the files in the download were lower case, for example checkoutplugin.class instead of CheckoutPlugin.class. This causes lots of errors, not sure why I got lower case.

Anyway, I looked into the customfields and it's not really flexible enough. But I can use it as a base to per product/album options. I'm going to try and give it a shot over the next few days if I have time, see if I can get something working. It shouldn't be too terribly difficult as I can copy a lot of the field code from the customfield module, and other than that it won't change your module at all except a few lines to check where to load the product/prices from.

 
drhiii

Joined: 2003-04-27
Posts: 397
Posted: Fri, 2005-06-10 16:25

FYI, it woiked! Installed and configured. This is a great mod... what kind of beverage of your choice and how much may I supply you with?

turnbulm wrote:
drhiii, it looks like the APIs have been incremented again in CVS for some change or other. You can take a stab at just making the module compatible (change the required API versions in module.inc) and see if it works. Please let me know! I wasn't planning on making interim releases compatible with CVS, only with the most recent Beta release.

 
g4m8i7

Joined: 2005-06-06
Posts: 6
Posted: Sat, 2005-06-11 04:54

Turnbulm: Is the number 5 item below visible yet, or is that what the number 8 item is? When do you think that being able to see transactions in Gallery via the admin account will happen?

5. (Done) PayPal Instant Payment Notification - accepting notification from PayPal and updating the persistent transaction record with that information

8. Admin view of transactions

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Sat, 2005-06-11 07:26

IPN is purely a back-end thing. If you want to poke around, go and have a look at the 'CheckoutTransaction' table in the database. You'll see the transactions getting written in there by Gallery as people get to the 'ConfirmProducts' page, then if they go ahead and pay with PayPal the IPN data is written in when it gets posted to us.

You are right to assume that the friendly view of all this will come in number 8... when I get a chance...

The current plan is to get the 'Checkout by Email' option finished first (that's not going to be this weekend, but hopefully sometime next week - work permitting). After that I'll be working on the admin view of transactions, but I don't yet have any thoughts on how long it may take.

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Sat, 2005-06-11 07:36
debtman7 wrote:
Hmmm, maybe command line unzip is funky? All of the files in the download were lower case...

I've just downloaded and unzipped the archive using 'unzip' from the command line of the Linux box I'm using right now, and I get the correct capitalization. Maybe check to see if you have any defaults set for unzip in your environment?

 
drhiii

Joined: 2003-04-27
Posts: 397
Posted: Sat, 2005-06-11 07:36

This was not meant for me, but I want to express how much this is appreciated. It is rare to be able to enage with bright minds that want to make a difference and write code like this. If I could I would. But I am not in this league. But I can say THANK YOU. Your work impacts a lot of people.

drhiii

turnbulm wrote:
IPN is purely a back-end thing. If you want to poke around, go and have a look at the 'CheckoutTransaction' table in the database. You'll see the transactions getting written in there by Gallery as people get to the 'ConfirmProducts' page, then if they go ahead and pay with PayPal the IPN data is written in when it gets posted to us.

You are right to assume that the friendly view of all this will come in number 8... when I get a chance...

The current plan is to get the 'Checkout by Email' option finished first (that's not going to be this weekend, but hopefully sometime next week - work permitting). After that I'll be working on the admin view of transactions, but I don't yet have any thoughts on how long it may take.

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Sat, 2005-06-11 07:43

Thanks very much for the comments of appreciation - it makes it much more pleasant to carry on working on something knowing that people out there like it!

As I mentioned in my earlier posts, let's not forget that this is dleaberr1's module at heart - I just took it and added the modifications I wanted to suit my own use. It's now turning into a bit more of a project, as I can see how flexible and useful it could be, and I'm starting to move it in that direction.

However, I have to confess that my motivation for this is primarily personal - I want it on my site!!!

Anyhow, thanks again for the comments, and I'll try to keep the updates rolling out. There may be a bit of a slow down for a week or two as I have a project at work that just got stupidly busy, and I have to do things like visit the in-laws at the weekend :eek:. But rest assured that development is continuing, just at a slightly slower pace.

 
g4m8i7

Joined: 2005-06-06
Posts: 6
Posted: Sat, 2005-06-11 12:35

Turnbulm, I agree whole heartedly with drhiii. I thank you for all the work you've put into improving upon Dleaberr1's original module. Also, thanks for taking to time to answer all my stupid questions :). You rock, man!

 
pictureshow

Joined: 2005-03-07
Posts: 9
Posted: Sun, 2005-06-12 03:00

Hi Turnbulm

Im getting this error what is the problem ?

Error (ERROR_BAD_PARAMETER)

* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 50 (gallerystatus::error)
* in modules/core/classes/GalleryCoreApi.class at line 2144 (galleryentityhelper_simple::loadentitiesbyid)
* in modules/checkout/SelectProducts.inc at line 47 (gallerycoreapi::loadentitiesbyid)
* in modules/core/classes/GalleryView.class at line 214 (selectproductsview::loadtemplate)
* in main.php at line 302 (selectproductsview::doloadtemplate)
* in main.php at line 86
* in main.php at line 77FAQ Gallery:d.4

I am trying to offer movie download's via your paypal module

BTW Great module
Thanks for the help

 
drhiii

Joined: 2003-04-27
Posts: 397
Posted: Sun, 2005-06-12 07:00

Well, this is the least anyone can do for someone who digs into the muck to create things like this. I wish I had coding skills as I would contrib that way instead of applying lip service and just asking questions.

One thing I am doing is looking to this wonderful application to help with some non profits to try and bring to them a way to gain a little revenue to their things, like some local museums for instance. So in that respect, know that you work and the work of the G2 authors are being aimed at supporting local non profits.

It is a great thing to be able to contrib things like your code to a greater purpose. It is appreciated more than I could map into words. Whatever I can do to help this little, now larger project of yours, I am all ears. Don'tcha like finding yourself in the catbird seat, tho you probably didn't want this aye?

regards, drhiii

turnbulm wrote:
Thanks very much for the comments of appreciation - it makes it much more pleasant to carry on working on something knowing that people out there like it!

As I mentioned in my earlier posts, let's not forget that this is dleaberr1's module at heart - I just took it and added the modifications I wanted to suit my own use. It's now turning into a bit more of a project, as I can see how flexible and useful it could be, and I'm starting to move it in that direction.

However, I have to confess that my motivation for this is primarily personal - I want it on my site!!!

Anyhow, thanks again for the comments, and I'll try to keep the updates rolling out. There may be a bit of a slow down for a week or two as I have a project at work that just got stupidly busy, and I have to do things like visit the in-laws at the weekend :eek:. But rest assured that development is continuing, just at a slightly slower pace.

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Sun, 2005-06-12 09:14
pictureshow wrote:
I am trying to offer movie download's via your paypal module

I've never tried this with items other than standard pictures - do you only get the error if there are movies in the cart? Do all your movies have thumbnails set (I'm not sure how the module will behave if it's given an item without a thumbnail)?

Can you post the URL of your gallery so I can have a look and see if I can work out what's going wrong please?

 
pictureshow

Joined: 2005-03-07
Posts: 9
Posted: Sun, 2005-06-12 20:13

Hi turnbulm,

<You Wrote>
I've never tried this with items other than standard pictures - do you only get the error if there are movies in the cart? Do all your movies have thumbnails set (I'm not sure how the module will behave if it's given an item without a thumbnail)?

Yes i only get this error with movies qt .mov .. I Manually added thumbnail to movie

You can take a look at
http://www.aspectfilms.net/gallery2

thanks for reply

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Sun, 2005-06-12 22:48

pictureshow, you've found a bug in how the plugin interoperates with the cart. This checkout plugin doesn't currently support anything apart from 'photo' item types. When you have a cart that only has movies in it, then you go to 'purchase photos' as the action, the cart module removes all the unsupported items (i.e. the only things in your cart) before handing off to the checkout module. So, the checkout module gets given an empty cart and told to fulfill it.

If you try putting a movie and a photo in the cart together you will see that the photo goes through the checkout process while the movie is dropped.

I'll have a look at how to fix the error if we get handed an empty cart - it's not entirely straightforward, and it's probably something that should be handled in the cart module itself instead of the checkout plugin.

As for the whole thing about allowing movies, that's not what this module was originally designed to do. There is no reason at all why you couldn't allow it, but the problem would arise if you supported multiple item types - how do you determine which products are allowed for which items? That's something that may get easier in later releases of the plugin if I get round to supporting product/price lists with per-item (or album) product filering.

For now, if you want to support movies, I'd suggest you change the CheckoutPlugin.class file. On line 40, replace 'GalleryPhotoItem' with 'GalleryMovieItem' to change the item type from photos to movies.

 
amyre

Joined: 2005-06-06
Posts: 7
Posted: Sun, 2005-06-12 23:03

Hi Turnbulm, first and foremost, I would like to say thank you for offering such a wonderful checkout module. Thanks to dleaberr1 also.

I have installed/upgraded the checkout module and all is working wonderfully. I especially like the IPN that you have emplemented. I do, however, have a question in regard to the IPN. I have multiple galleries set up, each having a dif url/name, and I would like to set up the IPN for each of these. Obviously, with having only one return url and IPN listed in paypal, this presents a problem.

In the past, when working with another script that used IPN, someone noted that there was a way to use multiple IPN and return urls by listing them in the script itself. Do you know if this could possibly work with this particular module?

I will see if I can find what was said in regards to the other script and see if I cant find something out in regards to this, but thought I would go ahead and toss the idea your way to see if it sounded like something that could be written in.

Thanks again for all of the hard work you have put into creating this checkout module, and for all of the effort you have put into trying to make it work for everyones needs.

 
pictureshow

Joined: 2005-03-07
Posts: 9
Posted: Mon, 2005-06-13 20:55

Cool that worked..My question is how would i be able to offer the file as a download ex. watch preview>likes it>buy's downloadable>

i would like show the preview not actual movie. the movie is for sale.retail file size 50-150mb..possible ?

Danks

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Tue, 2005-06-14 21:12

amyre- I've been reading through the PayPal developer's documentation, and I can't find any mention of being able to set different IPN and Auto-Return URLs for transactions from different sites. If you can find the discussion where you heard that before I'd be happy to have a look - I would prefer to be able to set the URLs programatically anyhow, as this is certainly the thing that is most error-prone at the moment!

pictureshow- I don't see why that wouldn't be possible, but it's a bit beyond what I've got planned at the moment. I would approach this by having the payment module grant "view original item" permissions to the user once payment is completed, but the detail would need some work.

 
littletechgirl
littletechgirl's picture

Joined: 2005-03-15
Posts: 53
Posted: Thu, 2005-06-16 01:33

I wanted to also add my thanks to both you guys for working on this. I for one will use it tons! And I am anxiously awaiting that email module. Isn't it a shame that work has to get in the way of our "side jobs" ;)

 
drhiii

Joined: 2003-04-27
Posts: 397
Posted: Thu, 2005-06-16 08:12

Both of these are challanges yes. The latter imo would be of much aid to photographers who can then post their originals and manage "everyone" viewing, but restrict the "View Original Item" to their short list of printers or whoever they wish to grant access.

Coupling the two items together, it would be the berries to have the URL(s) appended to an email once a transaction is made (I know this is dicey for the real transaction takes place inside PayPal, or via check, etc), but an email that contains inside it the URLs of the acquired images... I have thought about this a great deal but am nnot exactly sure of the behavior because of when the authenticated transaction takes place. But with the appended URLs of acquired/purchased images, would make it tons, tons easier to forward to one's print house and say "print this". It would really tighten the number of steps from creating print ready files and how to get them to a print house of choice.

And I felt littletechgirl's idea of a way to handle prepaid parties, where they could come in and select images, but with the option that stipulates "already paid" where a client can come in and select images. The same idea above where and email spits out to predefined email addresses with the URLs, and the rest is a matter of pushing to a printer and saying "print these". Just thinking outloud. Would cut the number of steps waaaay down.

Again, am extremely grateful that you are placing eyes on this. I just don't have the skills at this level.

regards, drhiii

turnbulm wrote:
amyre- I've been reading through the PayPal developer's documentation, and I can't find any mention of being able to set different IPN and Auto-Return URLs for transactions from different sites. If you can find the discussion where you heard that before I'd be happy to have a look - I would prefer to be able to set the URLs programatically anyhow, as this is certainly the thing that is most error-prone at the moment!

pictureshow- I don't see why that wouldn't be possible, but it's a bit beyond what I've got planned at the moment. I would approach this by having the payment module grant "view original item" permissions to the user once payment is completed, but the detail would need some work.

 
turnbulm

Joined: 2004-10-03
Posts: 431
Posted: Thu, 2005-06-16 21:11

dleaberr1- I just saw your edit to the front post for this - thanks very much for the vote of confidence! Now I just have to live up to the expectations...