Zen Cart Logo
Forums / PayPal Express Checkout support / Paypal Express on 1.3.09h - partial refund and other issues

Paypal Express on 1.3.09h - partial refund and other issues

Views: 3,847

Results 1 to 20 of 22
7 Dec 2010, 7:43 PM
#1
peterdd avatar

peterdd

New Zenner

Join Date:
Nov 2007
Posts:
21
Plugin Contributions:
0

Paypal Express on 1.3.09h - partial refund and other issues

I am using Paypal EC and have copied though the files contained in the 1.3.9h download. Site is 1.3.9h updated - and db upgraded. Many other mods - mostly shipping and alternative SagePay payments from CEON.

Cannot get Paypal partial refunds to work through Zen Cart admin. Full refunds are fine and update. Partials done on the Paypal site DO update the transaction on ZC.

Debug log response array for the ZC partial is:

Response:
Array
(
[TIMESTAMP] => 2010-12-07T10:43:45Z
[CORRELATIONID] => c849699dcd358
[ACK] => Failure
[VERSION] => 60.0
[BUILD] => 1613293
[L_ERRORCODE0] => 10001
[L_SHORTMESSAGE0] => Transaction failed due to internal error
[L_LONGMESSAGE0] => Internal Error
[L_SEVERITYCODE0] => Error
[CURL_ERRORS] =>
)

The request headers and parameters are fine - and match those for the successful full refund with the exception of [REFUNDTYPE => Partial and [AMT] being shown - which I believe is correct.

Any ideas? Is this a bug?

Also, we show goods including local tax (VAT) but when the user uses the express checkout button the amount they are asked to approve in Paypal is shown net of tax. They then return to our site where they choose the shipping and on the next page are shown the now correct tax inclusive price. Is this normal behavior?

If it is normal is there a way to get Paypal to show the tax inclusive amount? I notice from the logs that the tax amount is not being submitted to Paypal e.g for a £17.50 item:

paypalwpp
BEFORE line-item calcs: Array
(
[AMT] => 14.89
[ITEMAMT] => 14.89
[TAXAMT] => 0
[SHIPPINGAMT] => 0
[SHIPDISCAMT] => 0
[HANDLINGAMT] => 0
[INSURANCEAMT] => 0
)

  • AFTER doing line-item calcs: Array
    (
    [AMT] => 14.89
    [ITEMAMT] => 14.89
    [TAXAMT] => 0
    [SHIPPINGAMT] => 0
    [SHIPDISCAMT] => 0
    [HANDLINGAMT] => 0
    [INSURANCEAMT] => 0
    [L_NUMBER0] => Q280032
    [L_NAME0] => Adults Dunlop Acifort Heavyduty Welly - Green
    [L_DESC0] => Footwear Sizes: UK 10
    [L_AMT0] => 14.89
    [L_QTY0] => 1
    [DESC] => Tax included in prices: 0 (0)

Many thanks for reading all this!

7 Dec 2010, 7:49 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Paypal Express on 1.3.09h - partial refund and other issues

peterdd:

[L_ERRORCODE0] => 10001
[L_SHORTMESSAGE0] => Transaction failed due to internal error
[L_LONGMESSAGE0] => Internal Error
[L_SEVERITYCODE0] => Error
You'll need to contact PayPal for help in troubleshooting the unnamed "internal error" reported by their server: https://www.paypal.com/mts

7 Dec 2010, 8:43 PM
#3
peterdd avatar

peterdd

New Zenner

Join Date:
Nov 2007
Posts:
21
Plugin Contributions:
0

Re: Paypal Express on 1.3.09h - partial refund and other issues

Many thanks DrByte for you very quick response. I'll try with Paypal as you suggest and will report back if any progress.

In the meantime can you or anyone reading this help me with the second part of the question - the issue of the tax not being shown in the Paypal pages. It seems odd to have tax inclusive prices in the store, then tax exclusive prices in Paypal and then back to tax inclusive prices at checkout in the store. Is there a way to harmonize the total the customer sees?

Thanks

7 Dec 2010, 9:46 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Paypal Express on 1.3.09h - partial refund and other issues

Your prices include tax. That's exactly how it's being submitted to PayPal.
If you want PayPal to show the tax amount on each item, then switch your store to NOT show tax included in prices ... then it will calculate tax separately, and submit it separately.

8 Dec 2010, 10:15 AM
#5
peterdd avatar

peterdd

New Zenner

Join Date:
Nov 2007
Posts:
21
Plugin Contributions:
0

Re: Paypal Express on 1.3.09h - partial refund and other issues

Thanks for your reply - but I am confused now.

The item is shown in the cart at 17.50. The logs as shown in original post (and below) show the amount advised by ZC to Paypal is 14.89 (therefore net of tax). There isn't anything in the tax line probably for the reason you suggest. As you point out the log item [DESC] states 'tax included in prices' which is the store setting, but as I am pointing out 14.89 does not include tax! It is just wrong.

I don't want Paypal to show tax for each item - merely the total inclusive of tax - the amount customers think they are paying.

Taking the example given can I get the amount advised to Paypal to be the correct 17.50 (i.e. 14.89 + 17.5%VAT)?

Logs:
paypalwpp
BEFORE line-item calcs: Array
(
[AMT] => 14.89
[ITEMAMT] => 14.89
[TAXAMT] => 0
[SHIPPINGAMT] => 0
[SHIPDISCAMT] => 0
[HANDLINGAMT] => 0
[INSURANCEAMT] => 0
)

  • AFTER doing line-item calcs: Array
    (
    [AMT] => 14.89
    [ITEMAMT] => 14.89
    [TAXAMT] => 0
    [SHIPPINGAMT] => 0
    [SHIPDISCAMT] => 0
    [HANDLINGAMT] => 0
    [INSURANCEAMT] => 0
    [L_NUMBER0] => Q280032
    [L_NAME0] => Adults Dunlop Acifort Heavyduty Welly - Green
    [L_DESC0] => Footwear Sizes: UK 10
    [L_AMT0] => 14.89
    [L_QTY0] => 1
    [DESC] => Tax included in prices: 0 (0)

Many thanks for taking an interest is this issue.

Is this a bug in Paypalwpp or have I a store wide issue?

8 Dec 2010, 10:36 AM
#6
peterdd avatar

peterdd

New Zenner

Join Date:
Nov 2007
Posts:
21
Plugin Contributions:
0

Re: Paypal Express on 1.3.09h - partial refund and other issues

DrByte I have now received a response from Paypal about the unspecified 'internal error 10001' received when doing a partial refund from within Zen Cart.

Paypal said: "After reviewing the logs I was able to confirm the "currencycode" variable was missing from the request which is required within partial refunds. Once provided you should no longer have any errors. Below is the documentation for partial refunds along with other API calls, please use this for your reference.

Starting on page 161 for partial refunds: https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_NVPAPI_DeveloperGuide.pdf"

So my question is how do I get the currency code to be submitted? Is there something I should have done to do this?

The only currency is £ sterling with a code of GBP - in admin currencies.

8 Dec 2010, 6:12 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: Paypal Express on 1.3.09h - partial refund and other issues

Tell them that they've got a bug in their system. The CURRENCYCODE requirement was added to their documentation for Specification Version 63.0, but Zen Cart is presently using their 60.0 specification, which does not require CURRENCYCODE. They can check their 60.0 version of their documentation for confirmation. There's no reason for it to be rejected since the API call is written according to their published specifications.

9 Dec 2010, 9:12 AM
#8
peterdd avatar

peterdd

New Zenner

Join Date:
Nov 2007
Posts:
21
Plugin Contributions:
0

Re: Paypal Express on 1.3.09h - partial refund and other issues

DrByte - once again many thanks for helping here. I will see what Paypal say and report back.

In the meantime could you have a look at my comments in #5 above re the question about tax and prices. Any guidance would be appreciated.

regards

9 Dec 2010, 2:28 PM
#9
dvdtitan avatar

dvdtitan

New Zenner

Join Date:
Apr 2007
Posts:
87
Plugin Contributions:
0

Re: Paypal Express on 1.3.09h - partial refund and other issues

peterdd:

DrByte - once again many thanks for helping here. I will see what Paypal say and report back.

In the meantime could you have a look at my comments in #5 above re the question about tax and prices. Any guidance would be appreciated.

regards

I'm having exactly the same issue, would be interested to hear what they say.

10 Dec 2010, 9:20 AM
#10
peterdd avatar

peterdd

New Zenner

Join Date:
Nov 2007
Posts:
21
Plugin Contributions:
0

Re: Paypal Express on 1.3.09h - partial refund and other issues

I can now report an update from Paypal. I asked when the currency code become compulsory and advised to them DrByte's explanation re version 60.0 and 63.0 etc (see above).

They said:

I can advise that PayPal allows at least one year before most introduced variables become required. At this time the variable "currencycode" is a required variable for Partial Refunds only and we are unable to change the requirements back to older versions. I wanted to again advise that this issue is related only to when attempting to issue partial refunds within ZenCart. You are still able to login to the PayPal account to issue partial refunds as well. I've provided the published documentation in the prior response and unfortunately developers may have to make updates to their shopping carts to ensure they are current with our specifications for all features.

So there you have it. If you're wondering why partial refunds don't work, that's your answer!

PS anybody got an answer to my question as in #5 above?

10 Dec 2010, 4:29 PM
#11
myth3_16 avatar

myth3_16

New Zenner

Join Date:
Jun 2010
Location:
United Kingdom
Posts:
24
Plugin Contributions:
0

Re: Paypal Express on 1.3.09h - partial refund and other issues

I too am having the same problem. So if we want to do a partial refund what do we type in the box to issue the refund? I've tried everything as I need to issue a partial refund on postage to some of my customers.

I've tried 0.74, £0.74, GBP0.74, GBP 0.74, 0.74£ and still get nothing happening.

When I try £0.74 it says that I have not specified an amount.

So what exactly do we type in the box to get it working.

I'm using 1.3.9h with the files copied from the download.

Be interesting to see what happens from Paypal.

Thanks,

10 Dec 2010, 10:19 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: Paypal Express on 1.3.09h - partial refund and other issues

peterdd:

They said:

I can advise that PayPal allows at least one year before most introduced variables become required. At this time the variable "currencycode" is a required variable for Partial Refunds only and we are unable to change the requirements back to older versions. I wanted to again advise that this issue is related only to when attempting to issue partial refunds within ZenCart. You are still able to login to the PayPal account to issue partial refunds as well. I've provided the published documentation in the prior response and unfortunately developers may have to make updates to their shopping carts to ensure they are current with our specifications for all features.Gotta love it when they pass the buck. Whoever you're talking to doesn't even know what he/she is saying, and isn't doing ANYTHING to HELP you. Clearly he/she hasn't even bothered to look at the older specs to have ANY idea what you or I are talking about.

  • Spec 61.0 was published on January 21 2010, and DOES NOT require the currencycode parameter. THAT'S NOT A YEAR AGO YET.
  • Spec 62.0 was published on March 10 2010, and I don't have a copy of that file handy, so can't confirm whether currencycode was added as a requirement then. THAT'S ALSO NOT A YEAR AGO YET.
  • Spec 63.0 was published on May 11, and does list currencycode as a requirement.
    I've been dialoging with PayPal all year about fixing numerous other errors in their specifications ... things which just don't work. This is just another one that I can add to that list. They've got a lot of work to do yet.
    I'd like to update to their latest spec, but since the spec details aren't complete, I can't.

PM me with your PayPal MTS incident/ticket number, and your paypal account name, and a note saying that senior paypal staff can discuss the ticket with me ... and I'll see what's going on.

13 Dec 2010, 2:56 PM
#13
myth3_16 avatar

myth3_16

New Zenner

Join Date:
Jun 2010
Location:
United Kingdom
Posts:
24
Plugin Contributions:
0

Re: Paypal Express on 1.3.09h - partial refund and other issues

Has there been any movement on this issue as of yet?? or are we still waiting for a response from PayPal.

20 Dec 2010, 12:56 PM
#14
peterdd avatar

peterdd

New Zenner

Join Date:
Nov 2007
Posts:
21
Plugin Contributions:
0

Re: Paypal Express on 1.3.09h - partial refund and other issues

No movement yet - but I have PM DrByte with all the details he requested (as above) and await news from him.

22 Dec 2010, 9:49 AM
#15
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Paypal Express on 1.3.09h - partial refund and other issues

peterdd:

No movement yet - but I have PM DrByte with all the details he requested (as above) and await news from him.

My guess is that relevant people at PayPal are still scratching their heads - hence no news from the Doc as yet.

I am keen to hear the answer as well - same problem here (1.3.9h and PPEC) with partial refunds not being effected.

23 Dec 2010, 9:31 PM
#16
argyle avatar

argyle

New Zenner

Join Date:
Sep 2009
Posts:
71
Plugin Contributions:
0

Re: Paypal Express on 1.3.09h - partial refund and other issues

I can't even do a full refund through the Admin area in ZenCart, the page just reloads and nothing happens.

23 Dec 2010, 9:41 PM
#17
drbyte avatar

drbyte

Sensei

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

Re: Paypal Express on 1.3.09h - partial refund and other issues

Argyle:

I can't even do a full refund through the Admin area in ZenCart, the page just reloads and nothing happens.
That's a completely separate issue, and should be discussed in its own thread.

23 Dec 2010, 9:43 PM
#18
drbyte avatar

drbyte

Sensei

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

Re: Paypal Express on 1.3.09h - partial refund and other issues

peterdd:

No movement yet - but I have PM DrByte with all the details he requested (as above) and await news from him.
Evidently PayPal doesn't care that their old specs no longer work properly. I can understand that, but if their policy is 1 year, then they're clearly just passing the buck.
The only way to "fix" it right now is to hack up several core files with complicated code changes that would have to be undone again when upgrading to the next release. Not something I really want to encourage people to do, especially during Christmas weeks.

15 Feb 2011, 5:37 AM
#19
drbyte avatar

drbyte

Sensei

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

Re: Paypal Express on 1.3.09h - partial refund and other issues

Their documentation team has egg on their face.
Apparently the requirement has in fact existed for ages, but was never documented. Funny thing is it passed testing too when the code for that was originally written, so their engine seems to have supported it properly without currency code too, but no longer does.

Anyway, after looking at a number of approaches involving several files, I figure the following simpler approach will likely accomplish what you're after:
Make the following inserts/edits:
/includes/modules/payment/paypalwpp.php, around line 784:```
$txnID = $zc_ppHist->fields['txn_id'];
[B] $curCode = $zc_ppHist->fields['mc_currency'];
[/B] $PFamt = $zc_ppHist->fields['mc_gross'];


/includes/modules/payment/paypal/paypal_curl.php, line 248:```
  function RefundTransaction($oID, $txnID, $amount = 'Full', $note = ''[B], $curCode = 'USD'[/B]) {
```and line 259:```
        $values['REFUNDTYPE'] = 'Partial';
        [B]$values['CURRENCYCODE'] = $curCode;[/B]
        $values['AMT'] = number_format((float)$amount, 2);
16 Feb 2011, 4:58 AM
#20
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,017
Plugin Contributions:
2

Re: Paypal Express on 1.3.09h - partial refund and other issues

I note the proliferation of USD currency throughout the PayPal files and am wondering whether I should change these to AUD currency to reflect the default settings of my store.

I do not want is to give a refund in another currency at a loss to the original purchase due to forex movements.