Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal WPP Direct Payments & Express Checkout Support


dynamoeffects

Recommended Posts

Thanks for replying back Glen.... When I put my mouse on top of the link, the status bar shows

 

https://www.mysite.com/php4?action=express_...opping_cart.php

 

I don't know why it is showing up php4 cuz i searched php4 in the files but couldn't find it to replace it with the correct directory.

 

I'm not sure if it's because I need to install an early version of this mod first because I installed it fresh from v.1.0.4. Do i need to install like version 0.1.1 first then update it the version 1.0.4 or is version 1.0.4 a full package mod already?

 

No, version 1.0.4 is a full installer.

 

The button link is built from the following code:

 

<?php echo tep_href_link(basename($_SERVER['SCRIPT_NAME']), 'action=express_checkout&return_to=' . $return_to, 'SSL'); ?>

 

The server variable $_SERVER['SCRIPT_NAME'] is supposed to return the path to the current PHP file; in this case, it should be '/catalog/shopping_cart.php'. the PHP basename() function returns the filename part of the string, or 'shopping_cart.php'. tep_href_link() turns a filename into a URL into your store, or 'http://www.mysite.com/catalog/shopping_cart.php', and the action and return parameters are appended to the end of the URL.

 

Your server is not returning the expected value for SCRIPT_NAME. What web server are you running on? (Apache, Microsoft IIS, etc.) You can find this on the admin tool Server Info. Also, please post (or PM if you don't want to expose it to the world) relevant parts of your Server Info page. The HTTP Server and PHP version entries, plus the PHP variable section toward the bottom of the page (at least the _SERVER variables) at minimum will be very helpful in finding a solution to this problem.

 

The server environment variable SCRIPT_NAME is defined in the CGI 1.1 specification as "A virtual path to the script being executed, used for self-referencing URLs." It should be valid on all web servers.

 

--Glen

Link to comment
Share on other sites

Thanks for the reply.

I was quite meticulous adding the code and on re-checking I did not find any errors.

I have been looking into this further today and I believe it is a session issue.

 

When Paypal returns to my site (at the shopping cart) it has a different (new) session ID to the one it was passed when the Express Checkout button was clicked.

 

Does this indicate that the session has died?

 

OK so even if the session was correct why is it returning to the shopping cart after PayPal Express - is this correct?

 

Continuing to investigate ...

 

Any further help much appreciated.

 

Thanks

 

I am really struggling to diagnose this problem guys if anyone has any suggestions as to where the problem might be. Thanks. :angry:

Link to comment
Share on other sites

I am really struggling to diagnose this problem guys if anyone has any suggestions as to where the problem might be. Thanks. :angry:

 

First, please understand that the people who are providing support are generally shop owners, like you, and we have our own businesses to run. I answer as many questions as I can in my available spare time. While I have been using this module longer than almost anyone, I don't know the code line for line, as I only recently installed 1.x. Questions where I already know the answer, or can find it with minimal research, are more likely to get a prompt reply.

 

To answer your question, it may be a session problem, but I don't understand why it is happening. The Express Checkout button goes back to the shopping_cart.php page with an action parameter that is processed by the mod to includes/application_top.php. See steps #2 and #11 in the installation instructions. This PHP code sends the user to PayPal, then returns to checkout_shipping.php after the user logs in at PayPal.

 

--Glen

Link to comment
Share on other sites

First, please understand that the people who are providing support are generally shop owners, like you, and we have our own businesses to run. I answer as many questions as I can in my available spare time. While I have been using this module longer than almost anyone, I don't know the code line for line, as I only recently installed 1.x. Questions where I already know the answer, or can find it with minimal research, are more likely to get a prompt reply.

 

To answer your question, it may be a session problem, but I don't understand why it is happening. The Express Checkout button goes back to the shopping_cart.php page with an action parameter that is processed by the mod to includes/application_top.php. See steps #2 and #11 in the installation instructions. This PHP code sends the user to PayPal, then returns to checkout_shipping.php after the user logs in at PayPal.

 

--Glen

 

Hi Glen,

 

Apologies if my post came across as 'pushy', as that was not the intention. Perhaps my choice of the 'angry' icon was inappropriate in hindsight - I did not mean that I was angry because no-one had replied but I was angry at the fact I could not yet solve the problem. I fully understand that everyone generally replies in their spare time. Anyway many thanks for taking the time to reply and this will give me something to go on.

 

Best Regards,

 

 

A :blush:

Link to comment
Share on other sites

@clifton:

 

I'm trying to figure out this one as well. I have a customer site where this happens 100% of the time when trying to use Express Checkout. Ultimate SEO URLs are installed and enabled. I will try turning them off late tonight to see what, if any, effect that has.

 

FWIW, In my case the error is returned when coming back from PayPal, after logging in, arranging payment, etc, and coming back to checkout_payment.php, by the javascript_validation call in includes/classes/payment.php, as noted by the error message being set to JS_ERROR_NO_PAYMENT_MODULE_SELECTED .

 

Hopefully I'll have something more useful tonight.

 

-jared

Link to comment
Share on other sites

Hello:

 

I did not see error dump that begins with [PaymentDetails] and ends with [/PaymentDetails]?

 

This is what I received via e-mail ----> PayPal Error Dump

In function: before_process() - Express Checkout
Did first contact attempt return error? Nope 
Array
(
   [security] => 
   [RequesterCredentials] => Array
       (
           [0] => Array
               (
                   [Credentials] => Array
                       (
                           [0] => Array
                               (
                                   [username] => 
                                   [Password] => 
                                   [subject] => 
                               )

                       )

               )

       )

   [DoExpressCheckoutPaymentResponse] => Array
       (
           [0] => Array
               (
                   [Timestamp] => 2007-05-12T19:30:46Z
                   [Ack] => FailureWithWarning
                   [CorrelationID] => 4996c7af8aca1
                   [Errors] => Array
                       (
                           [0] => Array
                               (
                                   [shortMessage] => Transaction refused because of an invalid argument.  See additional error messages for details.
                                   [LongMessage] => The totals of the cart item amounts do not match order amounts.
                                   [ErrorCode] => 10413
                                   [severityCode] => Warning
                               )

                           [1] => Array
                               (
                                   [shortMessage] => Transaction cannot complete.
                                   [LongMessage] => The transaction cannot complete successfully.  Instruct the customer to use an alternative payment method.
                                   [ErrorCode] => 10417
                                   [severityCode] => Error
                               )

                       )

                   [Version] => 2.000000
                   [build] => 1.0006
                   [DoExpressCheckoutPaymentResponseDetails] => Array
                       (
                           [0] => Array
                               (
                                   [PaymentInfo] => Array
                                       (
                                           [0] => Array
                                               (
                                                   [TransactionType] => none
                                                   [PaymentType] => none
                                                   [PaymentStatus] => None
                                                   [PendingReason] => none
                                                   [ReasonCode] => none
                                               )

                                       )

                               )

                       )

               )

       )

)

 

 

I've been having this trouble too - anyone trying to purchase ends up getting billed twice which is truly making my customers a bit angry. I get almost the same email after each purchase. I also noticed that my cart contents is showing double numbers (i.e. instead of "SHOPPING CART 0 items" it shows "SHOPPING CART 0 0 items") so I'm wondering if that might have something to do with it as well. I'm trying the code fix that was 'not a double post' *grin* to see if that works but any other thoughts/ideas would be greatly appreciated!

 

Paige

Link to comment
Share on other sites

I've been having this trouble too - anyone trying to purchase ends up getting billed twice which is truly making my customers a bit angry. I get almost the same email after each purchase. I also noticed that my cart contents is showing double numbers (i.e. instead of "SHOPPING CART 0 items" it shows "SHOPPING CART 0 0 items") so I'm wondering if that might have something to do with it as well. I'm trying the code fix that was 'not a double post' *grin* to see if that works but any other thoughts/ideas would be greatly appreciated!

 

Paige

 

 

I also wanted to add that when I do put something in the cart it changes from 0 0 to 1 0 - I'm not sure if that makes a different or not but just in case! :)

Link to comment
Share on other sites

Non-Verified and/or Non-Address Confirmed PayPal Accounts

 

Greetings,

I currently have the module set to deny payments from non-verified and non-address confirmed PayPal accounts (in regards to PayPal Express Checkout). Is there a way to pop up a message that they were declined for this reason? Or does this functionality already exist? Currently in my tests, it just routes the user in circles, if it is declined - but I see no error message.

 

 

Thank you in advance

Link to comment
Share on other sites

Can someone please explain to me why I am getting an order total discrepancy error from what just seems to be the express module?

 

From the looks of it the credit card processing works fine, however after upgrading to 1.04 and hoping it would fix this problem it doesnt appear to be so as express payments are still showing this.

 

An example:-

 

Item 1 - TV Stand £26.04 (note this is the price exclusive of VAT for some reason)

Item 2 - Order Total Discrepancy £3.90 (where does this come from?)

 

SubTotal - £29.94

Postage and Packaging - £5.95

Total - £35.89

Payment - £35.89

 

In fact, the total should actually be £35.90 but guess thats just some kind of VAT rounding up/down? £26.04 + 15% actually equals £29.95 and not £29.94 as the module thinks.

 

Is there something I can change to help this along?

 

Thanks

 

Tony

Link to comment
Share on other sites

I should also say there is no Coupon module installed at all. This is a standard UK store with a few alterations, none of which are for order totals.

Link to comment
Share on other sites

update to the above post - this actually seems to work fine when the customer checks out normally, however I have a contrib installed which allows the customer to switch between vat inclusive/exclusive prices being displayed. The VAT inclusive prices being the default.

 

The times that this error has happened have been when the user has selected prices exclusive of VAT.

 

Is there anything I can do to fix this?

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

Hi, I have managed to get a site running ok and had some sales using Paypal but fairly new to OSC and e-commerce.

However I am trying to find out if I NEED to install add ons etc. for PayPal because I had a couple of buyers this month who got error pages.

Unfortunately I did not get any info on the pages, just know they were not able to buy with a card and had to send cheques.

I would appreciate any guidance as you appear to be conversant with this aspect of OSC :)

Link to comment
Share on other sites

update to the above post - this actually seems to work fine when the customer checks out normally, however I have a contrib installed which allows the customer to switch between vat inclusive/exclusive prices being displayed. The VAT inclusive prices being the default.

 

The times that this error has happened have been when the user has selected prices exclusive of VAT.

 

Is there anything I can do to fix this?

 

Tony,

Are you getting an error, or is the transaction processing correctly with the Order Total Discrepancy in the PayPal listing?

 

Which contrib is it? If it is modifying prices, so the cart contents don't match the order total on the cart, this is expected behavior.

 

osC maintains the order total as a separate item, and that is what WPP sends to PayPal as the amount to charge. WPP also sends an itemized list of what is in the cart to PayPal, so the customer (and shopowner) can see what was purchased. When sending an itemized list, PayPal requires that the sum of the items sent in the list match the order total. WPP aims to ensure that the list is valid by sending an "Order Total Discrepancy" item to make PayPal happy if the totals don't match. Some payment modules have an option to send just the total to PayPal, to work around this issue. Card customers don't see the itemized list, but Express Checkout customers will, so it is important to make it look good for the customer as well.

 

In theory, the transaction will process correctly when WPP adds an OTD entry; the whole point is to make the sums match what PayPal expects.

 

--Glen

Link to comment
Share on other sites

Hi Glen

 

Thanks for the reply.

 

I had installed the switch between inc and ex tax v1.0 rc2 contrib (http://addons.oscommerce.com/info/3408) which does indeed alter the cart total, so could see this error happening after i posted because of this.

 

What I have done now is removed the switch tax contrib and added a line below the inc vat price on product_info to show the exc vat price also. This should help any confusion and the error happening again.

 

The single penny error on tax rounding seemed to be coming from OSC and again only when this contrib was used did you see it, so getting rid of it eliminated the problem.

 

Tony

Link to comment
Share on other sites

Hi Glen

 

Thanks for the reply.

 

I had installed the switch between inc and ex tax v1.0 rc2 contrib (http://addons.oscommerce.com/info/3408) which does indeed alter the cart total, so could see this error happening after i posted because of this.

 

What I have done now is removed the switch tax contrib and added a line below the inc vat price on product_info to show the exc vat price also. This should help any confusion and the error happening again.

 

The single penny error on tax rounding seemed to be coming from OSC and again only when this contrib was used did you see it, so getting rid of it eliminated the problem.

 

Tony

Tony,

It's good that you found a workaround to your problem. I'm in the US, where prices are always displayed ex-tax and the tax is computed on the order total, so I wouldn't encounter the same issue.

 

In your example, the penny error appears to have been related to the switch tax contrib, as it seems to be truncating fractional cents, rather than rounding. The subtotal should have been £29.95, which would have made the order total discrepancy £3.91, the VAT amount. Remember that the subtotal and item prices are the values passed to the WPP module, and the order total discrepancy is the value computed to make the sum of the item prices match the subtotal.

 

--Glen

Link to comment
Share on other sites

It would take quite a bit of modification to do so. There is a PayPal Express Checkout module included in osC RC2a that provides basic functionality. Also, there is a PayPal Express Checkout IPN module that is derived from an earlier version of this contribution, by AlexStudio.

QUOTE (Landho @ Feb 2 2009, 09:28 PM) *

Is it possible to use only the PayPal Express portion of this contribution?

 

Hello,

 

Long time reader first time poster. I know I'm late to the party with this answer but I think a lot of people will want to do this after trying to rely on Paypal as their sole payment processor and realizing that relying on Paypal for *anything* is a dangerous, dangerous game. (This is what I did and it would have been a nightmare to fully remove this module from all 6 of my websites and reinstall a different Paypal module.)

 

There's a good shortcut I found to make this paypal WPP module work with just Express Checkout. All it does is remove the credit card entry details from the checkout payment screen for this module. The Google Checkout module does something almost identical. This DOES work with just Express Checkout - in other words you do NOT need the $30/month WPP to accept payments when you do this.

 

In checkout_payment.php find this:

 

$selection = $payment_modules->selection();

 

if (sizeof($selection) > 1) {

 

Replace with this:

 

$selection = $payment_modules->selection();

// Paypal WPP as Express Checkout Only Modificatioin

// Skips Paypal direct payment credit card info

for($i=0, $n=sizeof($selection); $i<$n; $i++) {

if($selection[$i]['id'] == 'paypal_wpp') {

array_splice($selection, $i, 1);

break;

}

}

//END paypal wpp credit card removal

 

if (sizeof($selection) > 1) {

 

It will look a lot different if you have the GCO module installed but it will still work the same (if you have GCO make sure $selection = $payment_modules->selection(); is only in there once).

 

OK hope this helps someone, thanks!

 

Jon

Link to comment
Share on other sites

I'm running 2.2MS2 and tried installing this WPP mod tonight because I really need to have an option for those who want to pay with CC directly instead of Paypal. It's not working, and I think it's because I installed THIS contrib - I used to get payments with no order showing all the time because users would not click through and return to the site after placing an order. I don't think the WPP contrib and this are playing well together.

 

My site is fairly heavily modded. I've been holding off on upgrading until v3 comes out. Am I better off trying to get these two contribs working together, or biting the bullet and upgrading to RC2a and using the built in WPP support? Was the "payment but no order issue" even fixed in RC2a? I read the release notes but didn't see it mentioned.

 

Basically I need to get WPP / express checkout working, but also need to avoid at all costs having items sold but not deducted from inventory (i.e. no order placed). Any tips in the right direction would be GREATLY appreciated.

Link to comment
Share on other sites

I'm running 2.2MS2 and tried installing this WPP mod tonight because I really need to have an option for those who want to pay with CC directly instead of Paypal. It's not working, and I think it's because I installed THIS contrib - I used to get payments with no order showing all the time because users would not click through and return to the site after placing an order. I don't think the WPP contrib and this are playing well together.

 

My site is fairly heavily modded. I've been holding off on upgrading until v3 comes out. Am I better off trying to get these two contribs working together, or biting the bullet and upgrading to RC2a and using the built in WPP support? Was the "payment but no order issue" even fixed in RC2a? I read the release notes but didn't see it mentioned.

 

Basically I need to get WPP / express checkout working, but also need to avoid at all costs having items sold but not deducted from inventory (i.e. no order placed). Any tips in the right direction would be GREATLY appreciated.

 

If it were me, I'd revert the changes you made with contribution #5199, install the WPP module, and remove the "stock" PayPal module. The "stock" PayPal module is completely useless, and decent PayPal payment modules have been available for a number of years, beginning with the osC PayPal IPN module originally by hpdl, but modified extensively by others. It is quite solid, and works around the "customer doesn't return to the shop" issue. You won't need the IPN contribution if you use WPP and enable the Express Checkout button on the payment page.

 

It is possible to install the RC2a Express Checkout payment module into older shops; it is available as a contribution posted by hpdl. It requires several modifications; be sure to read the documentation completely as it refers to a patch that you will find in the revision control system.

 

--Glen

Link to comment
Share on other sites

Hello!

 

First off, great contribution!

 

I encounter some strange issue when using express checkout.

 

I have everything working, but the confirmed address setting.

 

First - I am forcing the return address to Paypal.

 

If you have "Require a confirmed address" set to true, but use an unconfirmed address in sandbox.

 

It will push an error on the final checkout "Transaction cannot complete. (10417)".

 

From what I read (10417) is a payment mismatch, but that doesn't seem to be the case here.

 

Is there an XML code to tell paypal not to allow an unconfirmed address during the address selection?

 

Its odd that they can select an unconfirmed address without warning, yet doesn't kick out an error until the final process. I understand this could probably be set in the Paypal profile, but am wondering if there is a setting you can send in the initial response?

 

Any suggestion would be great. I am using a basic MS2 install.

Edited by L!mit
Link to comment
Share on other sites

Hey there - i've just installed the Paypal WPP contribution and run a test order on the live site. I got the store order process email confirmation, and I got an email from Paypal notifying me someone had made a payment - however, when looking at it as a customer I did not get any email confirming i'd made a payment. (This is a direct payment using a debit card).

 

Is this something I need to set up in Paypal, or if it's even at all possible?

 

I'm happy I get my order confirmation email, but as a customer i'd want some kind of email or notification for peace of mind that my payment was successful. Can Paypal trigger an email for a direct payment even though the customer is not a paypal member?

 

Thanks!!

Link to comment
Share on other sites

Can Paypal trigger an email for a direct payment even though the customer is not a paypal member?

 

No. It's not something that people would expect when using a credit card. Most cards have online access, and customers can check their activity history to verify that a payment was made.

 

--Glen

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