Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal WPP Direct Payments & Express Checkout Support


dynamoeffects

Recommended Posts

Hi dynamoeffects,

 

I found the solution although its not a perfect solution but it works for now. Turns out the module supplied by paypal has a bug and no one has found the currect replacement but here is the temperory solution:

 

Basically I had to go to /PayPal/SOAP/Transport/HTTP.php on line 575 and commented the line: curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

 

and now it works.:D

Regards,

 

Hoda

 

ohhhhhhhhh God I am going crazy!!! Now that i fixed that it still dont work :( It goes through invoices and even finishes it but it doesnt include the shipping rates :(( I dont know what to do anymore.

 

Please help,

 

Hoda

Link to comment
Share on other sites

@galto: You have the choice of using signature or certificate based authentication on both the sandbox and live production servers. The live certificate will not work in the sandbox and the sandbox certificate will not work on a live server.

 

@kingscomputers: Sorry to hear, but I'm not able to support a module I don't know anything about. Here's the PayPal support forum: https://www.paypaldeveloper.com/pdn/

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

Hey Brian,

 

Looks like a solid contribution; we're probably going to officially recommend it for osCommerce customers to use with our e-commerce backend app.

 

I'll be testing this against osCommerce MS2, CRE Loaded 6.1, 6.2, 6.2 (Pro), osCMax 2, Zencart 1.2, and Zencart 1.3. I've already seen elsewhere that this would not work with Zencart natively, but I've had trouble getting it to work with MS2 (the only one I've currently tested).

 

The issue is in the payment module itself; in 0.92 when running through direct payment, you appear to be relying on the global $order_totals to contain the grand total and shipping charges. Initially when applying this mod, I was not able to submit charges because $order_totals was an empty array (and hence, PayPal rejects the request because the amount is zero). This works perfectly when I use the $order object instead, e.g.:

 

...
   $order_info['PAYPAL_ORDER_TOTAL'] = number_format($order->info['total'] * $currency_value, 2, '.', '');
...
   $order_info['PAYPAL_SHIPPING_TOTAL'] = round($order->info['shipping_cost'] * $currency_value, 2);
...
   $order_info['PAYPAL_TAX_TOTAL'] = round($order->info['tax'] * $currency_value, 2);

 

Does this just work better with CRE Loaded or whatever derivative it was developed for? It seemed odd that a global array would just be unset, and not the order object. In any case, this works, and if it doesn't break anything in the other derivatives, would it be possible to include it in the main WPP release?

 

Anyway, we wound up implementing your mod because PayPal's branch doesn't actually store the transaction ID anywhere; yours does, albeit in the notes (but thankfully in a consistently delimited way). We generally depend on this to deal with the transaction after the order leaves osCommerce and enters our system. Was the decision to place it in the notes to make it easier for the customer/merchant to see, and would it be possible to place this ID in a separate column somewhere in the DB?

 

Thanks again for the great work.

 

-Mark

Link to comment
Share on other sites

It will work with CRELoaded out of the box, but will not work with ZenCart because they changed all of their function names to be prefixed with "zen_."

 

If your $order_totals array is empty, apply the bug fix contained in checkout_process.php and it should correct itself. osCommerce MS2 (pre RC1) has an ancient bug where it would calculate the order totals after the payment module has been executed, meaning that the actual total amount charged to the card would not always be the real total and would cause problems with contributions such as CCGV and similar modules.

 

The $order object was used at one time, but with the order itemization feature that submits the order list to PayPal, it was necessary to rely on the $order_total values to get an accurate total. Look at the $order object and look at the $order_total array and you'll see the difference. This is not a bug and is by design. If you prefer to use the $order object, you can refer to pre 0.8 versions of the module for example code, but the order itemization feature will cease to function.

 

The transaction information is stored in the comments for the simple reason that osCommerce does not come with any native method of storing transaction information other than dumping it in the comments. It was just simpler to do it that way than to modify the admin to display custom fields.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

It will work with CRELoaded out of the box, but will not work with ZenCart because they changed all of their function names to be prefixed with "zen_."

 

If your $order_totals array is empty, apply the bug fix contained in checkout_process.php and it should correct itself.

 

Ack, how'd I miss that? Works beautifully when actually patching all files as instructed. :)

 

Thanks again - I appreciate the explanation.

 

-Mark

Link to comment
Share on other sites

my Paypal Express Payment button isn't transparent anymore. has anyone else had this happen to them? The image i'm talking about is this one https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif when someone adds an item to their shopping cart and are taken to shopping_cart.php this button shows down on the bottom to checkout with paypal.

 

before you'd only see the button, and now it has a white background on my website http://www.advancespeedshop.com

 

does anybody know if paypal changed the button? i haven't messed with any stylesheets, and even if i did, the image is a white background now?

Edited by jasyn
Link to comment
Share on other sites

and just for reference .. here's the gif with a red background. http://www.advancespeedshop.com/imagey.html

 

and i don't kno if it was transparent before or not .. but i kno it didn't have that white background and was just a button .. so i don't know what is going on anymore? someone with a clue?

Edited by jasyn
Link to comment
Share on other sites

Oh, that's right. PayPal changed their logo today, so all of those little buttons would be changed.

 

Only thing to do is to create a new button and modify the module's source code to use that new button. In the next version I'll have the button included in the contribution so that this won't be a future problem.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

Oh, that's right. PayPal changed their logo today, so all of those little buttons would be changed.

 

Only thing to do is to create a new button and modify the module's source code to use that new button. In the next version I'll have the button included in the contribution so that this won't be a future problem.

 

sweet dynamoeffects :) any idea when that may happen?

Link to comment
Share on other sites

Our PayPal confirmation emails are looking a little different these days. Anyone else experiencing this? It doesn't seem to be causing any problems with checkout, just my Outlook rules. I just thought I would ask in case someone else has identified an issue with the change.

 

Thanks!

Kelly

Link to comment
Share on other sites

@swiftmed: Open up the included checkout_process.php file and search for "//---PayPal WPP Modification START ---//". Then open up your own checkout_process.php file and compare it to the same section of code. Note the difference between two lines and make the change.

 

Hi,

 

OK i have been looking at the area you have pointed out and do not know what i should be changing so i am posting that area of code here in the hope you could show me what needs changing. if you could help id really appreciate it.

 

My Checkout_process.php Code:

// load selected payment module
 require(DIR_WS_CLASSES . 'payment.php');
 $payment_modules = new payment($payment);

// load the selected shipping module
 require(DIR_WS_CLASSES . 'shipping.php');
 $shipping_modules = new shipping($shipping);

 require(DIR_WS_CLASSES . 'order.php');
 $order = new order;

// load the before_process function from the payment modules
 $payment_modules->before_process();

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 

Module Checkout_Process.php file

// load selected payment module
 require(DIR_WS_CLASSES . 'payment.php');
 $payment_modules = new payment($payment);

// load the selected shipping module
 require(DIR_WS_CLASSES . 'shipping.php');
 $shipping_modules = new shipping($shipping);

 require(DIR_WS_CLASSES . 'order.php');
 $order = new order;
//---PayPal WPP Modification START ---//
 //Fixes Bug#1629: [url="http://www.oscommerce.com/community/bugs,1629"]http://www.oscommerce.com/community/bugs,1629[/url]
 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 $order_totals = $order_total_modules->process();

// load the before_process function from the payment modules
 $payment_modules->before_process();
//---PayPal WPP Modification END ---//

 

I appreciate your advice.

Link to comment
Share on other sites

Getting the following error with PayPal Express Checkout:

 

Fatal error: Cannot instantiate non-existent class: httpclient in /home/valleye1/public_html/catalog/includes/modules/shipping/ups.php on line 265

 

Also get the same error with USPS.php if I disable the UPS module.

 

If the customer is logged into their account then the error will not appear. I have checked, rechecked, and double checked every modified file and I can't find the problem.

 

Here is the website: http://www.valley-ent.com/catalog

Link to comment
Share on other sites

@stuffy: No, this is only currently available to US/UK merchants. This contribution does not modify how items are added to cart, so your problem is more likely related to another contribution/modification.

 

@jasyn: No, unfortunately there is no timeline. SteveDallas just emailed me a bunch of bug fixes and I'll incorporate into the latest version as time permits.

 

@kellystee: PayPal just changed their corporate logo, so everything related was changed too.

 

@flash902001: Just replace the block of text you selected in the first one with the block of text in the second. You selected the correct area of the script.

 

@valleyent: Your problem is not related to this module. More than likely the includes/classes/http_client.php file was deleted somewhere along the way.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

Thx dynamo.

 

I deleted the entire site and started from scratch again. Was the only contrabutioon I had added.

Unable to figure which 1 is currently up and working for a Cnadian site. Tried several paypal contrabutions but unable to get them working.

The paypal that comes with the oscommerce package I guess could be used, but only allow for a user to enter the total amount manually.

Link to comment
Share on other sites

I recently installed the Direct Payment module and have it working for current users with direct credit card input.

 

I am getting the following error with people trying to create a login however...

 

1054 - Unknown column 'customers_paypal_ec' in 'field list'

 

select customers_id as id, customers_paypal_ec as ec from customers where customers_email_address = '[email protected]'

 

[TEP STOP]

 

 

Any thoughts on what I should do next?

Link to comment
Share on other sites

I contacted paypal about my issues with IE7 and they have reported back that I am getting several 10431 errors that could be causing my issues. This is with the very first of the UK versions that dynamoeffects made.

 

I have been asked to provide the logs for the SOAP requests but I am unable to locate these within my Cpanel and not getting much joy with my host,

 

Brian, I am not sure if you are even supporting the UK versions now but any advice you could through my way would be great as it seems, although quite randomly, people are unable to complete transactions in my store all the times.

 

Thanks a lot

Link to comment
Share on other sites

Hey Olly, just turn on debugging and when an order fails, the SOAP request will be mailed to you with the response.

 

10431 is a generic error that doesn't tell me much about what the problem is. Typically that's something only PayPal can resolve.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

Hi

 

I received an error

 

In function: before_process() - Direct Payment
Did first contact attempt return error? Yes 
---------------------------------------------------------------------
-------------------------------DP_DUMP-------------------------------
------------This is the information that was sent to PayPal----------
---------------------------------------------------------------------
---------------------------------------------------------------------
-------------------------------FINAL_REQ-----------------------------
-------------------This is the response from PayPal------------------
---------------------------------------------------------------------
Array
(
[Security] => 
[RequesterCredentials] => Array
	(
		[0] => Array
			(
				[Credentials] => Array
					(
						[0] => Array
							(
								[Username] => 
								[Password] => 
								[Subject] => 
							)

					)

			)

	)

[DoDirectPaymentResponse] => Array
	(
		[0] => Array
			(
				[Timestamp] => 2007-09-06T14:20:27Z
				[Ack] => FailureWithWarning
				[CorrelationID] => 70ab49adbcde2
				[Errors] => Array
					(
						[0] => Array
							(
								[ShortMessage] => Transaction refused because of an invalid argument.  See additional error messages for details.
								[LongMessage] => Item amount is invalid.
								[ErrorCode] => 10431
								[SeverityCode] => Warning
							)

						[1] => Array
							(
								[ShortMessage] => Invalid Data
								[LongMessage] => The issue number of the credit card is invalid.
								[ErrorCode] => 10560
								[SeverityCode] => Error
							)

					)

				[Version] => 2.000000
				[Build] => 1.0006
			)

	)

)


---------------------------------------------------------------------
---------------------------------TS_REQ------------------------------
--------Results of the transaction search if it was executed---------
---------------------------------------------------------------------

 

Does this mean anything?

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...