VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: rustle on March 26, 2020, 16:27:47 PM

Title: Paypal was working until last week now -10002 security header is not valid
Post by: rustle on March 26, 2020, 16:27:47 PM
Hi VM Team maybe someone can direct me to the right direction?
We have a Paypal pro account, which was processing CC transactions up until last week using the Paypal API creds
Nobody has changed credentials on either side (paypal or vm)

We did upgrade this week, but this error seems to have happened before the upgrade

Paypal support says it is an error on the vm side of things... and we need to check the debug file

I have turned on debug logs but I am unable to find the log file?
Where is this info stored?

Joomla version
v 3.9.16
vm version:
VirtueMart 3.6.10 10211
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: AH on March 26, 2020, 17:02:18 PM
In you joomla global settings

Systems tab

Path to Log Folder *
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: GJC Web Design on March 26, 2020, 17:07:00 PM
or turn on PP debug .. errors should show up
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: rustle on March 26, 2020, 17:28:31 PM
Hi guys
I thought of this file
but no new logging is occurring since last fall
/administrator/logs/com_virtuemart.log.php
here is the message on checkout
Error
vmError: 10002: Security header is not valid
Message
There was a problem processing your order, please try again or contact the store administrator.
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: rustle on March 26, 2020, 17:30:43 PM
I turned on vm debug for admin and I get this

Message
1 vmdebug Show All Errors, PHP-Version 7.3.162 vmdebug 1 Language, default shoplanguage (VmConfig::$jDefLang): en_gb en-GB3 vmdebug vmTime: time to load config: 0.006983041763305664 vmdebug Lädt die Config Var1:
en-GB
5 vmdebug There is no requested itemid loaded home Itemid Var1:
101
6 vmdebug Router initialised with language en-GB7 vmdebug vmTime: time to import plugins vmuserfield: 3.09944152832031E-58 vmdebug Start used Ram 4M9 vmdebug SSL enabled10 vmdebug my setupAddressFieldsForCart $countBT $this->byDefaultBT Var1:
29
Var2:
0
11 vmdebug Going to set pw fields unrequired12 vmdebug getVendorId normal shopper13 vmdebug My Memory Limit in Bytes 13421772814 vmdebug Canon cat found15 vmdebug gatherEffectingRulesForBill $hitsDeliveryArea 1 60 Var1:
Array
(
   
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: GJC Web Design on March 26, 2020, 17:41:51 PM
and the Paypal debug?
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: rustle on March 26, 2020, 18:03:59 PM
I can not find any debug info rom the Paypal plugin
this is with the debug settings turned on

this file displays no new errors
/administrator/logs/com_virtuemart.log.php

am I doing something incorrectly?
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: GJC Web Design on March 26, 2020, 18:25:37 PM
??

Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: rustle on March 26, 2020, 18:45:17 PM
yes both are turned on
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: rustle on March 26, 2020, 19:06:59 PM
Hi guys i found the log location, which is new to me
Vm admin --> Tools

here is the response
2020-03-26 17:52:55 DEBUG plgVmConfirmedOrder: order number: 5K6S050
2020-03-26 17:52:55 MESSAGE plgVmConfirmedOrder: Amount/Currency stored 1.13 paymentcurrency 26 orderusercurrency26
2020-03-26 17:52:55 DEBUG PayPal DoDirectPayment Request variables:: Array
(
    [METHOD] => DoDirectPayment
    [version] => 104.0
    [USER] => ian_api1.diagnoseathome.com
    [PWD] => **MASKED**
    [SIGNATURE] => **MASKED**
    [BUTTONSOURCE] => VirtueMart_Cart_PPA
    [CURRENCYCODE] => CAD
    [INVNUM] => 5K6S050
    [IPADDRESS] => 45.74.141.73
    [FIRSTNAME] => Russell
    [LASTNAME] => Compton
    [STREET] => 204 Ridgewood Rd
    [CITY] => Toronto
    [ZIP] => K9P1J3
    [STATE] => ON
    [COUNTRYCODE] => CA
    [SHIPTONAME] => Russell Compton
    [SHIPTOSTREET] => 204 Ridgewood Rd
    [SHIPTOCITY] => Toronto
    [SHIPTOZIP] => K9P1J3
    [SHIPTOSTATE] => ON
    [SHIPTOCOUNTRYCODE] => CA
    [ACCT] => **MASKED**
    [CVV2] => **MASKED**
    [CREDITCARDTYPE] => Visa
    [EXPDATE] => 042022
    [PAYMENTACTION] => Sale
    [AMT] => 1.13
    [L_NAME1] => test purchase
    [L_NUMBER1] => tp
    [L_AMT1] => 1
    [L_QTY1] => 1
    [L_TAXAMT1] =>
    [L_NAME2] => Medical Doctor  Free with OHIPMSP
    [L_NUMBER2] => C-MD-C
    [L_AMT2] => 59
    [L_QTY2] => 1
    [L_TAXAMT2] =>
    [SHIPPINGAMT] => 0
    [HANDLINGAMT] => -58.87
    [TAXAMT] => 0
    [ITEMAMT] => 60
)
2020-03-26 17:52:55 DEBUG PayPal response:: Array
(
    [TIMESTAMP] => 2020-03-26T17:52:56Z
    [CORRELATIONID] => 3cbe0f95c3f8d
    [ACK] => Failure
    [VERSION] => 104.0
    [BUILD] => 53816554
    [L_ERRORCODE0] => 10002
    [L_SHORTMESSAGE0] => Security error
    [L_LONGMESSAGE0] => Security header is not valid
    [L_SEVERITYCODE0] => Error
    [custom] => 4b44e6997ad38dfd732b6b5efdd1ba84
    [method] => DoDirectPayment
)
2020-03-26 17:52:55 DEBUG handleResponse:: Array
(
    [TIMESTAMP] => 2020-03-26T17:52:56Z
    [CORRELATIONID] => 3cbe0f95c3f8d
    [ACK] => Failure
    [VERSION] => 104.0
    [BUILD] => 53816554
    [L_ERRORCODE0] => 10002
    [L_SHORTMESSAGE0] => Security error
    [L_LONGMESSAGE0] => Security header is not valid
    [L_SEVERITYCODE0] => Error
    [custom] => 4b44e6997ad38dfd732b6b5efdd1ba84
    [method] => DoDirectPayment
)
2020-03-26 17:52:55 ERROR vmError: 10002: Security header is not valid<br />2020-03-26 17:52:55 DEBUG plgVmConfirmedOrder: order number: 5K6S050
2020-03-26 17:52:55 MESSAGE plgVmConfirmedOrder: Amount/Currency stored 1.13 paymentcurrency 26 orderusercurrency26
2020-03-26 17:52:55 DEBUG PayPal DoDirectPayment Request variables:: Array
(
    [METHOD] => DoDirectPayment
    [version] => 104.0
    [USER] => ian_api1.diagnoseathome.com
    [PWD] => **MASKED**
    [SIGNATURE] => **MASKED**
    [BUTTONSOURCE] => VirtueMart_Cart_PPA
    [CURRENCYCODE] => CAD
    [INVNUM] => 5K6S050
    [IPADDRESS] => 45.74.141.73
    [FIRSTNAME] => Russell
    [LASTNAME] => Compton
    [STREET] => 204 Ridgewood Rd
    [CITY] => Toronto
    [ZIP] => K9P1J3
    [STATE] => ON
    [COUNTRYCODE] => CA
    [SHIPTONAME] => Russell Compton
    [SHIPTOSTREET] => **MASKED**
    [SHIPTOCITY] => **MASKED**
    [SHIPTOZIP] => **MASKED**
    [SHIPTOSTATE] => **MASKED**
    [SHIPTOCOUNTRYCODE] => **MASKED**
    [ACCT] => **MASKED**
    [CVV2] => **MASKED**
    [CREDITCARDTYPE] => Visa
    [EXPDATE] => 042022
    [PAYMENTACTION] => Sale
    [AMT] => 1.13
    [L_NAME1] => test purchase
    [L_NUMBER1] => tp
    [L_AMT1] => 1
    [L_QTY1] => 1
    [L_TAXAMT1] =>
    [L_NAME2] => Medical Doctor  Free with OHIPMSP
    [L_NUMBER2] => C-MD-C
    [L_AMT2] => 59
    [L_QTY2] => 1
    [L_TAXAMT2] =>
    [SHIPPINGAMT] => 0
    [HANDLINGAMT] => -58.87
    [TAXAMT] => 0
    [ITEMAMT] => 60
)
2020-03-26 17:52:55 DEBUG PayPal response:: Array
(
    [TIMESTAMP] => 2020-03-26T17:52:56Z
    [CORRELATIONID] => 3cbe0f95c3f8d
    [ACK] => Failure
    [VERSION] => 104.0
    [BUILD] => 53816554
    [L_ERRORCODE0] => 10002
    [L_SHORTMESSAGE0] => Security error
    [L_LONGMESSAGE0] => Security header is not valid
    [L_SEVERITYCODE0] => Error
    [custom] => 4b44e6997ad38dfd732b6b5efdd1ba84
    [method] => DoDirectPayment
)
2020-03-26 17:52:55 DEBUG handleResponse:: Array
(
    [TIMESTAMP] => 2020-03-26T17:52:56Z
    [CORRELATIONID] => 3cbe0f95c3f8d
    [ACK] => Failure
    [VERSION] => 104.0
    [BUILD] => 53816554
    [L_ERRORCODE0] => 10002
    [L_SHORTMESSAGE0] => Security error
    [L_LONGMESSAGE0] => Security header is not valid
    [L_SEVERITYCODE0] => Error
    [custom] => 4b44e6997ad38dfd732b6b5efdd1ba84
    [method] => DoDirectPayment
)
2020-03-26 17:52:55 ERROR vmError: 10002: Security header is not valid<br />
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: AH on March 26, 2020, 19:29:30 PM
Check your API credentials
It is a 10002 PayPal error
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: rustle on March 26, 2020, 19:52:36 PM
These creds are only 6 months old
also were processing up until last week...

do you guys see any other errors in the above thread?
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: GJC Web Design on March 26, 2020, 20:06:52 PM
no - and just re-enter your creds

I had a client a couple of weeks ago who also swore blind the creds were correct.. but upon re-entering them it all worked..

It could have been something like the browser autofill etc filling the wrong details
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: rustle on March 26, 2020, 20:08:16 PM
Thanks guys
i will retry and report
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: rustle on March 26, 2020, 20:20:56 PM
When I logged in to the Paypal api,
the passwords were no longer the same length...?
this is posting orders again
thanks everybody

everybody swears they did not update the passwords

SOLVED
Title: Re: Paypal was working until last week now -10002 security header is not valid
Post by: AH on March 26, 2020, 20:35:06 PM
Well at least it is sorted!!

:)