Zen Cart Logo
Forums / Bug Reports / [Done v1.3.9] Express checkout strange behaviour

[Done v1.3.9] Express checkout strange behaviour

Locked

Views: 1,530

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
1 Nov 2009, 1:00 PM
#1
rozner avatar

rozner

New Zenner

Join Date:
Mar 2009
Posts:
8
Plugin Contributions:
0

[Done v1.3.9] Express checkout strange behaviour

Hi,

I'm having an issue with the express checkout when I set my products to virtual (which they are). When I click on confirm order I get redirected to paypal, which is normal, I log in, then I get a screen on Paypal that asks to confirm my information, which is only payment method and email address, and click continue. No where on this screen does it show the amount to be paid. Clicking continue, I would have thought would bring to a screen with a pay button, but it takes me back to my site's confirmation page (step 3 checkout page). If I click confirm again the order goes through. I checked the logs and it seems to indeed be doing a transaction but I find this process very odd. It's much smoother if I removed the virtual flag and use free shipping. Then after connecting to paypal I get a screen with the amount to be paid and a "Pay" button, then it takes me directly to the order confirmation page.

Any ideas on this?

1 Nov 2009, 8:21 PM
#2
rozner avatar

rozner

New Zenner

Join Date:
Mar 2009
Posts:
8
Plugin Contributions:
0

Re: [Done v1.3.9] Express checkout strange behaviour

ok well I've hacked a solution here but maybe someone can explain this.

After tracing through the code I think I've found the problem to be here:

paypalwpp.php

function ec_step2_finish

lines 2012 and 2195, it's the same in two places

if ($_SESSION['paypal_ec_markflow'] == 1) {
 $this->terminateEC('', false, FILENAME_CHECKOUT_PROCESS);
} else {
 $this->terminateEC('', false, FILENAME_CHECKOUT_CONFIRMATION);
}

So I've basically just commented this out and just use this every time:

$this->terminateEC('', false, FILENAME_CHECKOUT_PROCESS);

So far I see no negative side effects. I checked the CURL log and the DoExpressCheckout is successful. So can anyone tell me what 'paypal_ec_markflow' actually means, and why it's set to one when there's shipping involved, and not with virtual products???

Thanks

1 Nov 2009, 8:53 PM
#3
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,786
Plugin Contributions:
13

Re: [Done v1.3.9] Express checkout strange behaviour

Before hacking a solution, it might be best to check the forum for the latest PayPal fixes.

1 Nov 2009, 10:33 PM
#4
rozner avatar

rozner

New Zenner

Join Date:
Mar 2009
Posts:
8
Plugin Contributions:
0

Re: [Done v1.3.9] Express checkout strange behaviour

I spent a lot of time searching for a proper fix, I'd much prefer that, but I didn't find anything and this seems to work.

1 Nov 2009, 10:47 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.9] Express checkout strange behaviour

The markflow should only be set to 1 when you choose PayPal from the checkout_payment screen, and NOT when you choose it via the Express Checkout button.

2 Nov 2009, 10:19 AM
#6
rozner avatar

rozner

New Zenner

Join Date:
Mar 2009
Posts:
8
Plugin Contributions:
0

Re: [Done v1.3.9] Express checkout strange behaviour

ok, then it seems there is a bug since I am selecting paypal from the checkout_payment screen but markflow isn't getting set.

I haven't tested express checkout so I'm guessing that might fail with my hack. But I still need to figure out why the markflow doesn't get set when I'm using virutal products.

10 Nov 2009, 3:47 AM
#7
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.9] Express checkout strange behaviour

A more correct solution to your problem would be to make the following code edit, instead of the ones you reported earlier:

/includes/modules/payment/paypalwpp.php
around line 449, add the new line shown:```
function process_button() {
if ($this->in_special_checkout() || $this->enableDirectPayment == false) {
$process_button_string = '';
[B] $_SESSION['paypal_ec_markflow'] = 1;[/B]
} else {
$_SESSION['paypal_ec_markflow'] = 1;
$process_button_string = zen_draw_hidden_field('ec_cc_type', $_POST['paypalec_cc_type']) .