Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal WPP Direct Payments & Express Checkout Support


dynamoeffects

Recommended Posts

Just wanted to add that I still get the HTTP 500 error when clicking 'Confirm Order' on the checkout_confirmation page, which takes me to checkout_process page (where the error occurs), even after turning off the UPI and Auto-return in my PP profile.

Link to comment
Share on other sites

Not exactly. You can look at the code in paypal_wpp.php that handles CCGV (trad) to see how it's handled there and add similar code to work with Bonus Reward Points.

 

If there were a way to turn off itemization of the contents of the shopping cart, that would work, too. I just checked the docs and this isn't available.

 

--Glen

I'm having the same problem, only with shipping. I provide a shipping discount that results in a shipping refund (negative number) and this module works great with a credit card because it passes just the total for a credit card. Now if they choose the Express Checkout option, then it has a problem. Is there a way to hard code this so the EC option sends only the total dollar amount? This would eliminate the negative number and overcome this issue. Is there a profile setting on PayPal I need to enable to make this work? Thanks for any help Glen.

Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Link to comment
Share on other sites

OMG! I finally have a working WPP! Thank you! (I had to start from scratch on a fresh OSC install)

 

I am now trying to add my most important contrib's...the first being QT Pro 4.51b. I have noticed that the overall product's stock is lowered when a purchase is made, but the attribute's stock is not lowered. This issue has been posted several times over on the QT Pro forum but it has not been answered on how we can get the attribute's stock to adjust when a purchase is made using Paypal. It does not adjust when Direct or Express is used.

 

Has anyone here figured this out?

 

Thanks in advance!

Link to comment
Share on other sites

Brian,

 

I found a small programming error in includes/modules/payment/paypal_wpp.php

 

It's in this coding:

 

$js = ' if (payment_value == "' . $this->code . '") {' . "\n" .

' var cc_firstname = document.checkout_payment.paypalwpp_cc_firstname.value;' . "\n" .

' var cc_lastname = document.checkout_payment.paypalwpp_cc_lastname.value;' . "\n" .

' var cc_number = document.checkout_payment.paypalwpp_cc_number.value;' . "\n" .

' var cc_checkcode = document.checkout_payment.paypalwpp_cc_number.value;' . "\n" .

' if (cc_firstname == "" || cc_lastname == "" || eval(cc_firstname.length) + eval(cc_lastname.length) < ' . CC_OWNER_MIN_LENGTH . ') {' . "\n" .

' error_message = error_message + "' . MODULE_PAYMENT_PAYPAL_DP_TEXT_JS_CC_OWNER . '";' . "\n" .

' error = 1;' . "\n" .

' }' . "\n" .

' if (cc_number == "" || cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "\n" .

' error_message = error_message + "' . MODULE_PAYMENT_PAYPAL_DP_TEXT_JS_CC_NUMBER . '";' . "\n" .

' error = 1;' . "\n" .

' }' . "\n" .

' }' . "\n";

return $js;

}

}

 

When the above code is called in the checkout_payment.php page with this line:

<?php echo $payment_modules->javascript_validation(); ?>

 

It's not closing off the java scripting and that leaves the header of my page unable to load. I fixed it by adding

--></script> after this line "<?php echo $payment_modules->javascript_validation(); ?>" in the checkout_payment.php page. However, that's not the correct way it should work.

 

Just FYI, in case others are having troubles with their headers loading on the checkout_payment.php page.

 

Hope this helps someone.

Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Link to comment
Share on other sites

Brian,

 

I found a small programming error in includes/modules/payment/paypal_wpp.php

 

It's in this coding:

[snip]

 

When the above code is called in the checkout_payment.php page with this line:

<?php echo $payment_modules->javascript_validation(); ?>

 

It's not closing off the java scripting and that leaves the header of my page unable to load. I fixed it by adding

--></script> after this line "<?php echo $payment_modules->javascript_validation(); ?>" in the checkout_payment.php page. However, that's not the correct way it should work.

 

Just FYI, in case others are having troubles with their headers loading on the checkout_payment.php page.

 

Hope this helps someone.

 

This is *not* a WPP module bug. checkout_payment.php is calling the javascript_validation() function in catalog/includes/classes/payment.php, which in turn loads the validation function for each installed payment module. This function in the payment class is responsible for the <script> and </script> tags. Perhaps you cut out too much when you uninstalled CCGV. I would compare your includes/classes/payment.php to a fresh copy from your release version of osC to see what went wrong.

 

--Glen

Link to comment
Share on other sites

This is *not* a WPP module bug. checkout_payment.php is calling the javascript_validation() function in catalog/includes/classes/payment.php, which in turn loads the validation function for each installed payment module. This function in the payment class is responsible for the <script> and </script> tags. Perhaps you cut out too much when you uninstalled CCGV. I would compare your includes/classes/payment.php to a fresh copy from your release version of osC to see what went wrong.

 

--Glen

I should never doubt the masters (Brian and Glen), you're right! When I was uninstalling CCGV, the catalog/includes/classes/payment.php has multiple CCGV mods. Some of the mods are required to make the checkout_payment.php page function correctly. That includes the few lines that were modded by the authors of the CCGV. When I was removing the CCGV contrib, I mistakenly removed these lines. After I added them back in, everything is functioning as it should with no errors.

 

The following mods in the catalog/includes/classes/payment.php are *not* part of the CCGV (trad) contrib instructions:

 

// ############ Added CCGV Contribution ##########
//        $js .= "\n" . '  if (payment_value == null) {' . "\n" .
       $js .= "\n" . '  if (payment_value == null && submitter != 1) {' . "\n" . // CCGV Contribution
// ############ End Added CCGV Contribution ##########
              '    error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" .
              '    error = 1;' . "\n" .
              '  }' . "\n\n" .
// ############ Added CCGV Contribution ##########
//  ICW CREDIT CLASS Gift Voucher System Line below amended
//               '  if (error == 1) {' . "\n" .
              '  if (error == 1 && submitter != 1) {' . "\n" .
// ############ End Added CCGV Contribution ##########

 

All the lines I removed were not part of the original install instructions, however, they are commented as CCGV mods. Very confusing! If it hasn't been done already, rewriting this block of code (without the CCGV labels) might be helpful for others as well.

 

All is good and working great. Thanks for the heads up.

Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Link to comment
Share on other sites

hi,

 

i'm trying to integrate version 1.0.3 of Paypal WPP into osCommerce 2.2-MS2.

 

i found a bug that when using Express Checkout for a shopping cart that contains only "virtual" (i.e. downloadable) items the billing address is left blank instead of being populated by the response from PayPal. It works fine if the cart is a mixture or non-virtual, both the shipping and billing address are correctly populated but not if only a billing address is used.

 

looking at the code in /catalog/includes/modules/payment/paypal_wpp.php i noticed on line 587 this.

 

if (strpos($order->content_type,'virtual') !== false) {

 

i am not familar with the !== operator so changed it to a != and it fixed the problem.

 

i noticed there are several places in the code where the !== and === operators are used, please can someone tell me if these are correct and if my "fix" is correct or not?

 

kind regards

scott

Link to comment
Share on other sites

...the !== and === operators ...

!== Not identical;

=== Identical.

if you dont like them or they cause problems, then use

if (stristr($order->content_type,'virtual') ) {

, which I would.

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

This is a little off track, but regarding the module.

 

Been using wpp for some time now, and working just fine for our store.

 

Due to many customers balking at the cumbersome CC payment experience with paypal, we contracted merchant services aside from paypal.

It seem stupid to be paying (paypal) gateway fees to the tune of some $360 per year on top of our merchant services fees.

 

Will wpp module work with Paypal website payments standard product?

 

Thanks,

 

C

Link to comment
Share on other sites

This is a little off track, but regarding the module.

 

Been using wpp for some time now, and working just fine for our store.

 

Due to many customers balking at the cumbersome CC payment experience with paypal, we contracted merchant services aside from paypal.

It seem stupid to be paying (paypal) gateway fees to the tune of some $360 per year on top of our merchant services fees.

 

Will wpp module work with Paypal website payments standard product?

 

Thanks,

 

C

 

The short answer is "no".

 

Whether the "gateway" fee is stupid depends on your annual sales volume. PayPal's fees are fairly straightforward, and their "cross-border" rates are 1% over the domestic rates. In my case, this was the clincher, as when I last shopped for a merchant gateway, the international rates were much higher than domestic rates and I do a large percentage of my business in international sales.

 

The $30 per month fee to use the Direct Payments API (upon which WPP relies) seems trivial if you're doing $5k-10k/month.

 

--Glen

Link to comment
Share on other sites

hi,

 

i'm trying to integrate version 1.0.3 of Paypal WPP into osCommerce 2.2-MS2.

 

i found a bug that when using Express Checkout for a shopping cart that contains only "virtual" (i.e. downloadable) items the billing address is left blank instead of being populated by the response from PayPal. It works fine if the cart is a mixture or non-virtual, both the shipping and billing address are correctly populated but not if only a billing address is used.

 

looking at the code in /catalog/includes/modules/payment/paypal_wpp.php i noticed on line 587 this.

 

if (strpos($order->content_type,'virtual') !== false) {

 

i am not familar with the !== operator so changed it to a != and it fixed the problem.

 

i noticed there are several places in the code where the !== and === operators are used, please can someone tell me if these are correct and if my "fix" is correct or not?

 

kind regards

scott

 

The !== (not identical) and === (identical) operators were introduced in PHP4 and are used for strict comparisons between values. The strpos() function can return both zero to indicate that the search string was found at the beginning of the searched string, or 'false' to indicate that the string was not found at all. the normal comparison operators do not distinguish between these two values, so you wind up with the following issue:

 

content_type = 'virtual' 0

content_type = 'this is a virtual product' 10

content_type = 'physical' false

 

The code following "if (strpos($order->content_type,'virtual') != false) {" would be executed for 'this is a virtual product', but not for 'virtual', because 0 is equivalent to 'false'. With the original code, both types of virtual product are found.

 

Ken's solution using stristr() would also work (and is case-insensitive), but is slower.

 

--Glen

Link to comment
Share on other sites

The short answer is "no".

 

Whether the "gateway" fee is stupid depends on your annual sales volume. PayPal's fees are fairly straightforward, and their "cross-border" rates are 1% over the domestic rates. In my case, this was the clincher, as when I last shopped for a merchant gateway, the international rates were much higher than domestic rates and I do a large percentage of my business in international sales.

 

The $30 per month fee to use the Direct Payments API (upon which WPP relies) seems trivial if you're doing $5k-10k/month.

 

--Glen

 

That is too bad.

We have already seen a drastic percentage of sales being taken away from paypal since adding the merchant services.

Regardless of sales volume throwing away money on fees that do not need to be, still seems stupid to me.

360 annually, means a new tool, or 3 months of electricity, or a better raise/holiday gift to my p/t assistant or a trade show hotel room.

I do not take bandying about money lightly.

 

Paypal makes us jump through hoops for virtual terminal after years of WPP and still does not let us have it.

VT would make a number of our transactions easier.

WPP is too cumbersome/clunky at trade shows - we had to pick an alternate method.

 

We have in place now 2 license with our merchant services (one which uses the authorize.net API) at 1% to 1%+ lower than paypal depending if swiped or moto regardless of volume the prior month.

2 licenses are warranted - we do 40+% of our business at trade shows.

15% of sales are across border & pond, and the rate is not more than 1% higher than our domestic via merchant services.

It is all dependent on the vendor you use and how your account is classified.

Our business is seasonal in nature the Paypal volume "discount" isn't much as it typically comes after our peak periods.

 

Add all the monthly fees for merchant and paypal, and we spend 840, that's almost 1% on 100k sales.

I would prefer .5 percent knocking out paypal fees if it was possible.

 

Paypal states there are solutions with payments standard so I will investigate that channel...just had hoped I would not have to undo the existing install.

Thanks for the response.

Link to comment
Share on other sites

That is too bad.

We have already seen a drastic percentage of sales being taken away from paypal since adding the merchant services.

Regardless of sales volume throwing away money on fees that do not need to be, still seems stupid to me.

360 annually, means a new tool, or 3 months of electricity, or a better raise/holiday gift to my p/t assistant or a trade show hotel room.

I do not take bandying about money lightly.

I'm not sure what you mean by "We have already seen a drastic percentage of sales being taken away from paypal since adding the merchant services."

 

Paypal makes us jump through hoops for virtual terminal after years of WPP and still does not let us have it.

VT would make a number of our transactions easier.

WPP is too cumbersome/clunky at trade shows - we had to pick an alternate method.

Virtual Terminal is a feature included with WPP. See https://www.paypal.com/cgi-bin/webscr?cmd=_...re-list-outside It is available as a standalone product, but the cost is the same as WPP.

 

We have in place now 2 license with our merchant services (one which uses the authorize.net API) at 1% to 1%+ lower than paypal depending if swiped or moto regardless of volume the prior month.

2 licenses are warranted - we do 40+% of our business at trade shows.

15% of sales are across border & pond, and the rate is not more than 1% higher than our domestic via merchant services.

It is all dependent on the vendor you use and how your account is classified.

Our business is seasonal in nature the Paypal volume "discount" isn't much as it typically comes after our peak periods.

I agree that PayPal's volume discounts don't match well with seasonal businesses. My business isn't very seasonal, so I have only missed my usual discount once in the past four years or so.

 

Add all the monthly fees for merchant and paypal, and we spend 840, that's almost 1% on 100k sales.

I would prefer .5 percent knocking out paypal fees if it was possible.

So you pay $360 to PayPal for WPP and another $480 to your other processor? I can understand why you would want to consolidate. PayPal doesn't know or care what you are spending on another merchant account; it's not surprising that PayPal's monthly fees are similar to the other processor's fee.

 

What I don't understand is why you would want to use both WPP and a traditional merchant account. If you have a traditional merchant account, you can use a gateway such as authorize.net to funnel your website business into your regular processing channels. This helps in aggregating volumes with one processor as well. My business is exclusively on the web, so my priorities are different than yours.

 

Paypal states there are solutions with payments standard so I will investigate that channel...just had hoped I would not have to undo the existing install.

Thanks for the response.

If all you want to do is add PayPal as an additional payment method, and run credit cards through your current processor, I would use PayPal's Express Checkout solution. It's a required element of WPP, but it is also available without a fee when used without Direct Payment. There are Express Checkout contributions for osC; a simple one is included with RC2a, and a more robust one that was originally based on this WPP contribution.

 

--Glen

Link to comment
Share on other sites

I'm not sure what you mean by "We have already seen a drastic percentage of sales being taken away from paypal since adding the merchant services."

 

Glen, what I am saying is, we have both.

Since adding merchant services to our payment methods, almost 40% of sales shifted FROM Paypal WPP so far.

By this I mean of credit card transactions.

Of course we have a certain percentage who still opt to pay directly from their paypal account.

Make more sense? Hope so, sorry if I worded that poorly.

 

Virtual Terminal is a feature included with WPP. See https://www.paypal.com/cgi-bin/webscr?cmd=_...re-list-outside It is available as a standalone product, but the cost is the same as WPP.

Most of the time, that is the case.

However, Paypal, refused to give us VT, but did give us WPP.

We have requested reconsideration 2-3x now over the past few years.

So we pay for WPP without having the benefit of VT.

See the quandry and the hassles?

 

So you pay $360 to PayPal for WPP and another $480 to your other processor? I can understand why you would want to consolidate. PayPal doesn't know or care what you are spending on another merchant account; it's not surprising that PayPal's monthly fees are similar to the other processor's fee.

Yes, we do pay all that.

I know PP doesnt give a rats patootie, never was my concern.

Simply was hoping to save a little scratch to be used elsewhere, as suggested before.

I feel that the PP fees aren't all that bad, but our merchant services (outside of to processing fees for 2 types of accounts) are significantly lower, in percentage, and per transaction.

That additional cost is offset so I do not feel bad about it.

Just would love to save the other 360.

 

 

What I don't understand is why you would want to use both WPP and a traditional merchant account. If you have a traditional merchant account, you can use a gateway such as authorize.net to funnel your website business into your regular processing channels. This helps in aggregating volumes with one processor as well. My business is exclusively on the web, so my priorities are different than yours.

I think I covered the why a little earlier, obviously we have sales in both channels.

In this day of the craptacular economy less people will be able to use CCs than in the past, so retaining a PP payment system will permit us to to retain a wider customer base.

We are using the authorize.net api, thanks.

Yep different priorities, but maintaining a successful business is both our goals.

 

If all you want to do is add PayPal as an additional payment method, and run credit cards through your current processor, I would use PayPal's Express Checkout solution. It's a required element of WPP, but it is also available without a fee when used without Direct Payment. There are Express Checkout contributions for osC; a simple one is included with RC2a, and a more robust one that was originally based on this WPP contribution.

 

--Glen

 

 

I need to look at express solution/direct payment or payments standard.

Unfortunately I have not had the time to commit to updating to RC2 from MS2.2 and ensure the migration of the heavily customizes OSC we run now doesn't need a major debug effort.

Thanks for the suggestions and the dialogue.

 

Corey

Link to comment
Share on other sites

Glen, what I am saying is, we have both.

Since adding merchant services to our payment methods, almost 40% of sales shifted FROM Paypal WPP so far.

By this I mean of credit card transactions.

Of course we have a certain percentage who still opt to pay directly from their paypal account.

Make more sense? Hope so, sorry if I worded that poorly.

Yes, this makes much more sense. To my mind, PayPal WPP or merchant services through a traditional account is an either/or decision. If it were my shop, once I added a merchant account through authorize.net, I would remove WPP and select another payment module for PayPal transactions.

I need to look at express solution/direct payment or payments standard.

Unfortunately I have not had the time to commit to updating to RC2 from MS2.2 and ensure the migration of the heavily customizes OSC we run now doesn't need a major debug effort.

Thanks for the suggestions and the dialogue.

 

Corey

I'm with you on the MS2 vs RC2a issue. If it isn't broken, don't fix it. I have downloaded RC2a to play with, but it is going to require a lot of work before it will replace my MS2 shop.

 

WPP consists of two core APIs. Direct Payment (accept credit cards on your site) and Express Checkout (customer logs into PayPal which returns shipping address and such).

 

What I understand from this conversation is that you no longer need to use the Direct Payment portion of WPP because you have added a merchant account through authorize.net as your credit card solution, but you still need a PayPal solution that doesn't carry a monthly fee.

 

You may want to evaluate the following modules to replace WPP in your MS2 shop:

PayPal Express Checkout by hpdl Basic, stable. This is the module now included in RC2a. Works with API signature only and doesn't support cURL proxy. (I have developed fixes for both limitations.) Doesn't itemize when sending to PayPal.

PayPal Express Checkout IPN by AlexStudio Based on the WPP module that you are currently using. Doesn't appear to have active support at this time.

osCommerce PayPal IPN Module For 2.2MS2 Uses an older PayPal API for sending payment data. This is the granddaddy of stable osC PayPal modules. It does funny things with the checkout flow, so it requires custom hacks with certain other modules. I'd only use it if the other modules were unacceptable for some reason.

 

The Express Checkout API works with any PayPal business account, so you can drop WPP and continue to use Express Checkout without a fee.

 

Good luck in sorting this out.

 

--Glen

Edited by SteveDallas
Link to comment
Share on other sites

Hello. I'm getting an error dump from paypal that I just can't figure out. I'm fairly new to oscommerce (and in turn this module) and this has been happening since my predecessor and I'd like to get it fixed. The error is listed below. My best guess from all of the searching (haven't found much) and debugging I've been doing is that oscommerce is passing the module a null value to send to paypal. That is just a guess though. I've had others tell me that it's a connection (curl) issue with godaddy (which I'm unfortunately hosting on) - but seeing as I'm getting a response back (or so it seems) that doesn't seem like the issue. What do I know though, right? BTW - the error is hand parsed - so sorry if it's at all confusing.

 

In function: ec_step1() 
SetExpressCheckoutResponseType Object ( 
[Token] => 
[Timestamp] => 2008-12-30T12:36:17Z 
[Ack] => Failure 
[CorrelationID] => 809d6e9860384 
[Errors] => ErrorType Object ( 
	[ShortMessage] => Transaction refused because of an invalid argument. See additional error messages for details. 
	[LongMessage] => Order total is invalid. 
	[ErrorCode] => 10401 
	[SeverityCode] => Error 
	[ErrorParameters] => 
	[_elements] => Array ( 
		[ShortMessage] => Array ( 
			[required] => 1 
			[type] => string 
			[namespace] => urn:ebay:apis:eBLBaseComponents) 
		[LongMessage] => Array ( 
			[required] => 
			[type] => string 
			[namespace] => urn:ebay:apis:eBLBaseComponents ) 
		[ErrorCode] => Array ( 
			[required] => 1 
			[type] => token 
			[namespace] => urn:ebay:apis:eBLBaseComponents ) 
		[SeverityCode] => Array ( 
			[required] => 1 
			[type] => SeverityCodeType 
			[namespace] => urn:ebay:apis:eBLBaseComponents ) 
		[ErrorParameters] => Array ( 
			[required] => 
			[type] => ErrorParameterType 
			[namespace] => urn:ebay:apis:eBLBaseComponents ) 
	) 
	[_attributes] => Array ( ) 
	[_attributeValues] => Array ( ) 
	[_namespace] => urn:ebay:apis:eBLBaseComponents 
) 
[Version] => 2.3 
[Build] => 779008 
[_elements] => Array ( 
	[Timestamp] => Array ( 
		[required] => 
		[type] => dateTime 
		[namespace] => urn:ebay:apis:eBLBaseComponents 
		[charset] => iso-8859-1 ) 
	[Ack] => Array ( 
		[required] => 1 
		[type] => AckCodeType 
		[namespace] => urn:ebay:apis:eBLBaseComponents 
		[charset] => iso-8859-1 ) 
	[CorrelationID] => Array ( 
		[required] => 
		[type] => string 
		[namespace] => urn:ebay:apis:eBLBaseComponents 
		[charset] => iso-8859-1 ) 
	[Errors] => Array ( 
		[required] => 
		[type] => ErrorType 
		[namespace] => urn:ebay:apis:eBLBaseComponents 
		[charset] => iso-8859-1 ) 
	[Version] => Array ( 
		[required] => 1 
		[type] => string 
		[namespace] => urn:ebay:apis:eBLBaseComponents 
		[charset] => iso-8859-1 ) 
	[Build] => Array ( 
		[required] => 1 
		[type] => string 
		[namespace] => urn:ebay:apis:eBLBaseComponents 
		[charset] => iso-8859-1 ) 
	[Token] => Array ( 
		[required] => 1 
		[type] => ExpressCheckoutTokenType 
		[namespace] => urn:ebay:api:PayPalAPI ) 
) 
[_attributes] => Array ( ) 
[_attributeValues] => Array ( ) 
[_namespace] => urn:ebay:api:PayPalAPI 
)

Link to comment
Share on other sites

[LongMessage] => Order total is invalid.

[ErrorCode] => 10401

 

clearly means Your order total has a wrong value.

 

Do check for this variable.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

This is the support thread for the PayPal Direct Payments & Express Checkout module. Please post any bugs or errors you see while using it so that they can be fixed.

 

The contribution can be found here:

http://www.oscommerce.com/community/contributions,3647

 

 

 

Hello there! I'm having a bit of trouble with my PayPal WPP addon (I'm using paypal_wpp_1.0.1). I don't have any problems at all during the purchasing process but at the end of the purchase it is charging the customer twice for each product. So if they purchase one product at $20 it is showing up as 2 separate purchases of the same product for $20 ea. Needless to say this is making my customers a bit testy. I don't know where to even begin trying to figure out why it's doing this so any help would be greatly appreciated!

 

Thanks,

Paige

Link to comment
Share on other sites

Hello!

 

Since we're using the Paypal WPP module osCommerce order IDs are no longer visible on PayPal website. I've figured out that whereas Paypal standard payments module communicates the actual osCommerce order id over to PayPal, Payments Pro does not do so but uses unique transaction IDs. My question is, are you aware of a quick fix that would add the osCommerce order id back in ? Would it be safe to just replace the transaction ID with the osCommerce order ID ? It's our business administration who are having a hard time trying to figure out which payment belongs to which order.

 

We're running Paypal WPP 1.0.3 together with Dynamo Checkout.

 

Thanks in advance for your help!

Link to comment
Share on other sites

Hello, I have been tying to integrate Web Payments to my site but keep running into the following errors:

 

This one occurs when I test a transaction. After I enter in my credit card information this error shows up

 

Warning: pre_confirmation_check(/mnt/w0802/d10/s03/b02f743a/www/canadianchain.ca/catalogincludes/classes/cc_validation.php) [function.pre-confirmation-check]: failed to open stream: No such file or directory in /mnt/w0802/d10/s03/b02f743a/www/canadianchain.ca/catalog/includes/modules/payment/paypal_wpp.php on line 194

 

Fatal error: pre_confirmation_check() [function.require]: Failed opening required '/mnt/w0802/d10/s03/b02f743a/www/canadianchain.ca/catalogincludes/classes/cc_validation.php' (include_path='.:/usr/local/nf/lib/php') in /mnt/w0802/d10/s03/b02f743a/www/canadianchain.ca/catalog/includes/modules/payment/paypal_wpp.php on line 194

 

 

as far as I can tell the CC_validation is in the correct location and I followed the instructions that came with Paypal_wpp_1.0.3 contribution. Any help here?

 

Here is the code that it is referring to in paypal_wpp.php:

 

function pre_confirmation_check() {

global $_POST, $_SESSION;

//If this is an EC checkout, do nuttin'

if (tep_session_is_registered('paypal_ec_token') && tep_session_is_registered('paypal_ec_payer_id') && tep_session_is_registered('paypal_ec_payer_info')) {

return false;

} else {

require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'cc_validation.php'); LINE 194

 

$cc_validation = new cc_validation();

$result = $cc_validation->validate($_POST['paypalwpp_cc_number'], $_POST['paypalwpp_cc_expires_month'], $_POST['paypalwpp_cc_expires_year']);

 

$error = '';

if ($result === -1) {

$error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4));

} elseif ($result > -5 && $result < -1) {

$error = TEXT_CCVAL_ERROR_INVALID_DATE;

 

 

I am also having a problem with th express checkout but more on that later.........

 

Thanks

Link to comment
Share on other sites

Hello, I have been tying to integrate Web Payments to my site but keep running into the following errors:

 

This one occurs when I test a transaction. After I enter in my credit card information this error shows up

 

Warning: pre_confirmation_check(/mnt/w0802/d10/s03/b02f743a/www/canadianchain.ca/catalogincludes/classes/cc_validation.php) [function.pre-confirmation-check]: failed to open stream: No such file or directory in /mnt/w0802/d10/s03/b02f743a/www/canadianchain.ca/catalog/includes/modules/payment/paypal_wpp.php on line 194

 

as far as I can tell the CC_validation is in the correct location and I followed the instructions that came with Paypal_wpp_1.0.3 contribution. Any help here?

You are missing a trailing slash ('/') in the definition of DIR_FS_CATALOG in the file catalog/includes/configure.php. In MS2 and prior versions of osC, it was required that you set this value yourself. Starting in RC1, the code was changed to detect the correct value at runtime with this statement:

 

  define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/');

 

You can fix yours to read:

  define('DIR_FS_CATALOG', '/mnt/w0802/d10/s03/b02f743a/www/canadianchain.ca/catalog/');

 

Or change it to the RC1 and later version. Either one should work.

 

--Glen

Edited by SteveDallas
Link to comment
Share on other sites

Hello!

 

Since we're using the Paypal WPP module osCommerce order IDs are no longer visible on PayPal website. I've figured out that whereas Paypal standard payments module communicates the actual osCommerce order id over to PayPal, Payments Pro does not do so but uses unique transaction IDs. My question is, are you aware of a quick fix that would add the osCommerce order id back in ? Would it be safe to just replace the transaction ID with the osCommerce order ID ? It's our business administration who are having a hard time trying to figure out which payment belongs to which order.

 

We're running Paypal WPP 1.0.3 together with Dynamo Checkout.

 

Thanks in advance for your help!

 

Order IDs aren't assigned until the order is committed to the database, which is after the payment is confirmed, so there is no easy way to do this.

 

The PayPal-generated transaction ID is stored with the order, and is displayed on the orders page when viewing an individual order. Matching shouldn't be too difficult, but you may have to add some code to display the transaction history to whatever document or report your business administration people look at to do the matching. You can borrow the code from the changes that WPP makes to orders.php.

 

I have done something similar. My customers get an invoice out of my accounting package and the osC invoice is used internally as backup showing the original order and transaction history.

 

--Glen

Link to comment
Share on other sites

Hello. I'm getting an error dump from paypal that I just can't figure out. I'm fairly new to oscommerce (and in turn this module) and this has been happening since my predecessor and I'd like to get it fixed. The error is listed below. My best guess from all of the searching (haven't found much) and debugging I've been doing is that oscommerce is passing the module a null value to send to paypal. That is just a guess though. I've had others tell me that it's a connection (curl) issue with godaddy (which I'm unfortunately hosting on) - but seeing as I'm getting a response back (or so it seems) that doesn't seem like the issue. What do I know though, right? BTW - the error is hand parsed - so sorry if it's at all confusing.

 

As Satish pointed out, PayPal is complaining about the Order Total. This error usually appears when the sum of the payment data items submitted to PayPal doesn't equal the total. A common cause of this error occurs when you use a coupon system other than CCGV(trad).

 

From your error dump, I see that it happened during an Express Checkout transaction.

 

Does it happen with all such transactions, or only with some orders?

 

Do credit cards process normally?

 

Do you have a coupon system installed in your shop?

 

Does the problem appear only when a coupon is applied?

 

There is a "Debug Mode" setting in the module's controls. Try enabling it; a copy of the transaction request and response should be emailed to the store owner address. That will allow you to see what is being sent to PayPal. Examine the Order Total, as well as the individual payment data items. You should be able to determine why things don't add up. That will put you on the path to resolving it.

 

--Glen

Link to comment
Share on other sites

You are missing a trailing slash ('/') in the definition of DIR_FS_CATALOG in the file catalog/includes/configure.php. In MS2 and prior versions of osC, it was required that you set this value yourself. Starting in RC1, the code was changed to detect the correct value at runtime with this statement:

 

  define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/');

 

You can fix yours to read:

  define('DIR_FS_CATALOG', '/mnt/w0802/d10/s03/b02f743a/www/canadianchain.ca/catalog/');

 

Or change it to the RC1 and later version. Either one should work.

 

--Glen

 

 

Hello Glen, Thanks a lot for the tip. It is working for me now! We fixed it by using the second code you recommended. Anyway thanks again!

 

Richard

Link to comment
Share on other sites

The PayPal-generated transaction ID is stored with the order, and is displayed on the orders page when viewing an individual order. Matching shouldn't be too difficult, but you may have to add some code to display the transaction history to whatever document or report your business administration people look at to do the matching. You can borrow the code from the changes that WPP makes to orders.php.

Thanks so much Glen, that's really fantastic!

 

I did have another question actually: is there an easy way to combine the first and last name fields for direct payment, so that you have one field ('Name as it appears on the credit card') instead ? I think that's a more common approach nowadays. Currently it only checks that you've entered something and accepts the payment even if you just enter your first name, which is not that nice.

 

Thanks again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...