Paypal gives you the option with their standard account to create: 'Add to Cart', 'Buy Now', 'Donation' and 'Subscription' buttons.

Right now you can plug in the generated ID for any of these and still use this module, but it would be cool to also offer the option to display the different button types.

CommentFileSizeAuthor
#8 button_type-1198260-8.patch2.83 KBAnonymous (not verified)
#7 button_type-1198260-7.patch2.47 KBmrf
#1 button_type-1198260-1.patch2.12 KBavr

Comments

avr’s picture

StatusFileSize
new2.12 KB

This patch adds the ability to select between a "Buy Now" and "Donate" button.

Perhaps a better method would be to provide a textfield and allow users to enter a hosted image from this page: https://ppmts.custhelp.com/app/answers/detail/a_id/632

avr’s picture

Actually, here is another location to find button images: http://www.rocketgranny.com/codeclips/pp_button_images.php

mrf’s picture

Status: Postponed » Needs review
mrf’s picture

Just wanted to let you know that I will be totally swamped until after Badcamp, but I'll definitely have some time again next week to check this and your other new feature.

Thanks for the great additions to the module.

ashedryden’s picture

Tested patch against 7.x-1.0 and failed.

Hunk #1 FAILED at 34.
Hunk #2 succeeded at 56 (offset -11 lines).
Hunk #3 FAILED at 190.
Hunk #4 succeeded at 159 with fuzz 2 (offset -116 lines).

mrf’s picture

Patch failed for me as well.

Looking at the patch and the provided link with all the images, I think there is a more flexible way we could do this, and make it easier to change if Paypal decides to move things around.

So each button has three types, small, large, and large wtih cc logos, if we include the right prefix we can also easily internationalize these (all the languages follow the same URL structure).

To me the most important buttons are 'Buy Now' 'Donate" and 'Subscribe' which should all come for "free" with a standard paypal account. Someone who regularly uses paypal correct me here if I'm wrong.

So instead of a button_get function I'd like to see a button_build function that takes type, style, and language as parameters and returns a well formed link.

mrf’s picture

StatusFileSize
new2.47 KB

Here is a patch for button types. This definitely needs some testing but should be working as is.

Anonymous’s picture

StatusFileSize
new2.83 KB

I tested the above patch and it worked, however I then made a few changes (e.g. I got the default values working properly, grammar tweaks, etc.).

mrf’s picture

Status: Needs review » Fixed

Committed to 7.x-1.x dev thanks for all the help and reviews.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.