If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / PayPal Express Checkout support / I want to disable Paypal Express for Some Sales

I want to disable Paypal Express for Some Sales

Locked

Started by rich_li_ny on 22 Oct 2007, 3:52 PM · Views: 4,903

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
22 Oct 2007, 3:52 PM
#1
rich_li_ny avatar

rich_li_ny

New Zenner

Join Date:
Aug 2007
Location:
New York State & Cape Town
Posts:
76
Plugin Contributions:
0

Post #1 by rich_li_ny

I just installed the Paypal Express Module. All seems to be working great. But I have a couple questions.

I'm in a high fraud business (Telephone). We sell both Installations of equipment and 'virtual' products such as prepaid calling credit (Airtime).

Paypal does not offer seller protection for sales to some countries. Therefore I do not want to accept Paypal payments for virtual items like airtime/calling credit. But will gladly accept payment from companies and individuals requesting other non virtual items such as equipment installations.

This way we then know exactly who were dealing with and therefore reduce our chances of being ripped off by the client.

Is it possible to restrict Paypal express payments from customers buying only 'virtual' products?

If the answer is yes.. please tell me how I can do this....

If it can't be done I would like to: Make a note above the big yellow "Checkout with Paypal" Logo that is on my shopping cart informing customers that:

"Paypal Payments are only accepted for physical installation services and for payment on existing commercial accounts. All other customers please click the "Go to Checkout' button and select another payment option"

And add another note as well to the payment options page.

On my checkout page I have Moneybookers (no charge backs) and I also accept direct bank payments.

Restricting PP to product types would be great.. but if its not possible please tell me how I can add a note above the PP logo.

Thanks,
Rich

22 Oct 2007, 4:08 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

rich_li_ny:

Is it possible to restrict Paypal express payments from customers buying only 'virtual' products?How exactly would one determine whether all the products in the cart are 'virtual' or not?
ie: what distinguishes these "virtual" products from the others on your site?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Oct 2007, 4:24 PM
#3
rich_li_ny avatar

rich_li_ny

New Zenner

Join Date:
Aug 2007
Location:
New York State & Cape Town
Posts:
76
Plugin Contributions:
0

Post #3 by rich_li_ny

For Example:

One Product is an actual inventory item. In this case an ATA (Like Vonage).

Another product is Calling Credit/Airtime (Calling credit or prepaid vouches like Trac Phone in the USA or MTN - Vodacom in Europe) and is entered into Zen Cart as a Virtual product.

Our concern is the Airtime and not allowing PP Express when a customer chooses to only purchase Airtime / Calling credit.

If it's not possible to do that I would like to make a note above the Paypal express button informing customers that they must choose another payment option if only purchasing these virtual Items.

22 Oct 2007, 4:31 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #4 by drbyte

Let me rephrase. Yes, the module can be disabled, to some degree.

Now that that's out of the way, I'll ask again ... is there a clear way to quickly identify whether everything in the cart is allowed to be paid-for by PayPal according to your needs?
ie: are all these so-called "virtual" marked as "virtual" in Zen Cart? and all non-virtual products are NOT marked "virtual" in Zen Cart?
And, if they're "virtual" in Zen Cart, are they downloads? or are they delivered to customers in some other kind of manner?
Is there any other distinguishing characteristic of these products (according to how you've configured them in Zen Cart) that can be used to determine elegibility.

I'm trying to get you to identify ways to determine whether to disable the module based on things other than the product number, etc.

The challenge is in dealing with a cart containing "both" kinds of items. I assume you'd disable PayPal for the entire order in this case.

If you prefer just to add your additional wording, you can modify the /includes/modules/payment/paypal/tpl_ec_default.php file and add it where you like.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Oct 2007, 5:58 PM
#5
rich_li_ny avatar

rich_li_ny

New Zenner

Join Date:
Aug 2007
Location:
New York State & Cape Town
Posts:
76
Plugin Contributions:
0

Post #5 by rich_li_ny

DrByte:

Let me rephrase. Yes, the module can be disabled, to some degree.

Now that that's out of the way, I'll ask again ... is there a clear way to quickly identify whether everything in the cart is allowed to be paid-for by PayPal according to your needs?

ie: are all these so-called "virtual" marked as "virtual" in Zen Cart?
Yes... the virtual item is marked as Virtual.

and all non-virtual products are NOT marked "virtual" in Zen Cart?
Yes they are.

And, if they're "virtual" in Zen Cart, are they downloads? or are they delivered to customers in some other kind of manner?
They are delivered via email.

Is there any other distinguishing characteristic of these products (according to how you've configured them in Zen Cart) that can be used to determine elegibility.
The one thing that is different about the virtual product is the product number.
There is only 1 virtual product. With options for different value amounts.
So maybe it can be narrowed down to an item number like Category 1 Subcategory 2??

The challenge is in dealing with a cart containing "both" kinds of items. I assume you'd disable PayPal for the entire order in this case.
Yes.. if that was the only option.

If you prefer just to add your additional wording, you can modify the /includes/modules/payment/paypal/tpl_ec_default.php file and add it where you like.
Cool.. I'll do that part of it now :)

Thanks for the reply
Rich

22 Oct 2007, 8:13 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #6 by drbyte

Only 1 product is virtual?

So, you're asking if it's possible to disable the PayPal Express Checkout option if one certain product ID is in the cart?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Oct 2007, 6:31 AM
#7
rich_li_ny avatar

rich_li_ny

New Zenner

Join Date:
Aug 2007
Location:
New York State & Cape Town
Posts:
76
Plugin Contributions:
0

Post #7 by rich_li_ny

Yes.. that is exactly what i am asking.

It may seem strange to some. But I have very good reason for Not allowing paypal for one or two particular transactions. I sell installations and service. On an installation.. I know my customer, get copies of ID, get contracts signed etc.. In this case paypal is fine.

On sales for just services I get paid by someone on the net who often times buys a virtual product.. (Prepaid Airtime).

THIS IS AN EXAMPLE OF THE VIRTUAL PRODUCT I SELL:
Just Think of Tracfone or Boost Mobile in the USA (They sell airtime vouchers at 7-11). Or MTN, Vodacom, Cell C or Orange Prepaid a/k/a "Pay as you Go".

Its basically I sell PIN Numbers

Whether it be prepaid cell phone airtime or a similar Virtual product. I simply don't want to accept Paypal for this. The reason is.. there is ZERO Paypal seller protection in a couple of the countries I sell to.

So yes.. I only want to block PP Express payments on Prepaid airtime or
On orders where only Prepaid airtime. or On Orders of Prepaid Airtime where the customer isn't an established existing customer.

Either way works for me.. as long as I can block paypal express on virtural items or block it by a particular item number. :)

Thanks ~

Riche

23 Oct 2007, 3:52 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #8 by ajeh

If you look in the:
/includes/classes/shopping_cart.php

There is a function for checking the content of a given field in the shopping cart:

   * Method to calculate the number of items in a cart based on an abitrary property
   *
   * $check_what is the fieldname example: 'products_is_free'
   * $check_value is the value being tested for - default is 1
   * Syntax: $_SESSION['cart']->in_cart_check('product_is_free','1');
   *
   * @param string product field to check
   * @param mixed value to check for
   * @return integer number of items matching restraint
   */
  function in_cart_check($check_what, $check_value='1') {

You could use this to test how many products_virtual = 1 are in the cart ...

This can then be used to control the $this->enabled of any of the modules to show or hide them ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

25 Oct 2007, 5:37 PM
#9
rich_li_ny avatar

rich_li_ny

New Zenner

Join Date:
Aug 2007
Location:
New York State & Cape Town
Posts:
76
Plugin Contributions:
0

Post #9 by rich_li_ny

Thanks Linda..

I'm playing with it now :)

Rich

27 Oct 2007, 9:33 AM
#10
rich_li_ny avatar

rich_li_ny

New Zenner

Join Date:
Aug 2007
Location:
New York State & Cape Town
Posts:
76
Plugin Contributions:
0

Post #10 by rich_li_ny

Wow.... I took a look at the files and it's like totally out of my league.

I think an easier solution would be to not display show Paypal Express on
index.php?main_page=shopping_cart

and

Add a note below the PP payment option on
index.php?main_page=checkout_payment stating:

"PayPal payment is only accepted for Professional Installations and from existing business customers. For all other purchases please choose one of the other payment options above."


Ive already added to Note on the Split Login page..
but I have no clue how to disable the Paypal Express button from displaying on the
index.php?main_page=shopping_cart page.

Any ideas how I can do this??

Doing this would solve the problem I'm having. As I would still be able use Paypal Express checkout, my customers will know the PP Express is only for certain items (reducing my risk of fraud) and everything else will continue to work smoothly.

Of course a customer could could still choose to completely ignore this and use PP express anyway.. In which case I would not process the order and simply refund any monies.

27 Oct 2007, 1:27 PM
#11
rich_li_ny avatar

rich_li_ny

New Zenner

Join Date:
Aug 2007
Location:
New York State & Cape Town
Posts:
76
Plugin Contributions:
0

Post #11 by rich_li_ny

I have just installed PayPal Express in my store..

I have a service company and both sell products for customers to install themselves and also sell products that we deliver and install.

I don't want to take Paypal express as payment for any items that we are not personally installing for the customer at there premises.

Reason being:
There is NO seller protection for PayPal sellers if the customer is in South Africa.
Customers we sell and install are a LOT less likely to be fraudsters.

With that said.. I would like to add a same text above the Express Checkout button that is displayed on

index.php?main_page=shopping_cart
(Your Shopping cart Contents page)

Putting a note about it saying:
"PayPal express checkout is available only for customers purchasing Installations. All other customers please choose 'go to checkout'."

I can't for the life of me figure out where to put this text. Could someone please tell me what file/line of what file I need to add this text to??

I'm literally going crazy with this.

Thanks for the help.

Rich

27 Oct 2007, 2:24 PM
#12
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Post #12 by econcepts

Use the developers toolkit in the Admin.

Search on the text already above the PayPal express checkout section (at least part of it).

That will brig up a list of the language files which contain the information you need to edit in order to work with the text.

Just add your disclaimer where you need it in that file.

Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information

27 Oct 2007, 2:32 PM
#13
rich_li_ny avatar

rich_li_ny

New Zenner

Join Date:
Aug 2007
Location:
New York State & Cape Town
Posts:
76
Plugin Contributions:
0

Post #13 by rich_li_ny

econcepts:

Use the developers toolkit in the Admin.

Search on the text already above the PayPal express checkout section (at least part of it). ....

That's the problem ~ there is no test above it. I've got:

"back to shopping" button on the left
"go to checkout" button on the right

and a big yellow Check out with Paypal button below "go to checkout"

I need to place my conditions for using PP express above the button.
(Which also makes it below the "go to checkout" button a/k/a button_checkout.gif)

So there is no text to search :(

27 Oct 2007, 3:34 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #14 by drbyte

/includes/modules/payment/paypal/tpl_ec_button.php
insert your custom text as shown:```

<div id="PPECbutton" class="buttonRow"> <p>INSERT CUSTOM TEXT HERE</p> <a href="<?php echo zen_href_link('ipn_main_handler.php', 'type=ec', 'SSL', true, true, true); ?>"><img src="<?php echo MODULE_PAYMENT_PAYPALWPP_EC_BUTTON_IMG ?>" alt="<?php echo MODULE_PAYMENT_PAYPALWPP_TEXT_BUTTON_ALTTEXT; ?>" /></a> </div> ```

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Oct 2007, 5:25 PM
#15
rich_li_ny avatar

rich_li_ny

New Zenner

Join Date:
Aug 2007
Location:
New York State &amp; Cape Town
Posts:
76
Plugin Contributions:
0

Post #15 by rich_li_ny

Wow!!
That worked great! :clap:

I was totally lost and literally going crazy trying to get this right.

THANK YOU SO MUCH!
I really really appreciate your help!!

Rich

27 Oct 2007, 7:34 PM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #16 by drbyte

You can edit that same file to insert logic to skip the button if cart contents includes the virtual product you want to not allow PP for.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Oct 2007, 8:16 PM
#17
rich_li_ny avatar

rich_li_ny

New Zenner

Join Date:
Aug 2007
Location:
New York State &amp; Cape Town
Posts:
76
Plugin Contributions:
0

Post #17 by rich_li_ny

DrByte:

You can edit that same file to insert logic to skip the button if cart contents includes the virtual product you want to not allow PP for.
Thats exactly what I'm trying to do.. not use PP on Virtual Products.

As for insert logic, I stand a much better chance of walking on water or levitating before I figure that one out.

How difficult is it? Is there like a little thing you can post that wouldn't take you more then a minute?

This is like learning how to swim in the deep side of the swimming pool.

Trying to stay on topic: This will probably come up regarding the Google CO module also. As Google will not cover sellers of virtual products/downloads.

Thank you for the reply and help.

Rich

27 Oct 2007, 10:03 PM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #18 by drbyte

At the top of that same file is a line like this:```
$paypalec_enabled = (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True');

Add this line directly below it:```
if ($_SESSION['cart']->in_cart_check('products_virtual')) $paypalec_enabled = false;

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.