Posted on 2007-03-29 10:18:54-07 by clhari
Getting error 10002 'Security Header is not Valid' in PayPal's response
Hi,

Thank you for the Perl SDK for PayPal Website Payments Pro..

I tried to install it, and I got the following screen........

============================STARTS_HERE===================================================
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Business-PayPal-API......ok
t/DirectPayments...........NOK 2/9
# Failed test 'Direct Payment Sale'
# at t/DirectPayments.t line 54.
# got: 'Failure'
# expected: 'Success'
t/DirectPayments...........NOK 3/9
# Failed test 'Direct Payment Sale'
# at t/DirectPayments.t line 96.
# got: 'Failure'
# expected: 'Success'
t/DirectPayments...........NOK 4/9
# Failed test 'Direct Payment Basic Authorization'
# at t/DirectPayments.t line 139.
# got: 'Failure'
# expected: 'Success'
t/DirectPayments...........ok 5/9Label not found for "last SKIP" at /usr/lib/perl5/5.8.4/Test/More.pm line 1014.
# Looks like you planned 9 tests but only ran 6.
# Looks like you failed 3 tests of 6 run.
# Looks like your test died just after 6.
t/DirectPayments...........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 2-4, 7-9
Failed 6/9 tests, 33.33% okay (less 2 skipped tests: 1 okay, 11.11%)
t/ExpressCheckout..........ok 2/6
Now paste the following URL into your browser (you'll need to have another browser window already logged into the PayPal developer site):

https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-08332241WN843045W

Login to PayPal as the Buyer you specified in 'auth.txt' and proceed to checkout (this authorizes the transaction represented by the token). When finished, PayPal will redirect you to a non-existent
URL:

http://localhost/return.html?token=EC-08332241WN843045W&PayerID=XXXXXXXXXXXXX

Notice the *PayerID* URL argument (XXXXXXXXXXXXX) on the redirect from PayPal.

Type or paste that PayerID here and hit Enter:
HEQMR5B2L43P4
t/ExpressCheckout..........ok
t/ExpressOrder.............ok 2/8
Now paste the following URL into your browser (you will need to have another browser window already logged into the PayPal developer site):

https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-3AS79022206910711

Login to PayPal as the Buyer you specified in 'auth.txt' and
proceed to checkout (this authorizes the transaction represented by
the token). When finished, PayPal will redirect you to a non-existent
URL:

http://localhost/return.html?token=EC-3AS79022206910711&PayerID=XXXXXXXXXXXXX

Notice the *PayerID* URL argument (XXXXXXXXXXXXX) on the redirect from
PayPal.
Once completed, The Payer account and Payee account can be checked for an order,
authorization, and void.

Type or paste that PayerID here and hit Enter:
=======================================ENDS_HERE==============================================


I proceeded with the integration of my site with the perl sdk, and after several tries, I'm getting a response from PayPal Sandbox:

PayPal response "Failure" announced: (10002) Security header is not valid (CorrelationID: e9343ef9f1d36)


I was using a certificate when I got this message. So I tried signature, but was not getting any response. So I reverted back to certificate keeping in mind that atleast I got some response.

I searched in pdncommunity for any solution, and found that even I have given the credentials in the correct way, I get this error message.


Could someone provide me some light into this situation. I want to know how to make this get a "Success" message from PayPal Sandbox..

Thanks in advance

Hari
Direct Responses: 4786 | 6825 | Write a response
Posted on 2007-04-09 06:26:40-07 by clhari in response to 4701
Re: Getting error 10002 'Security Header is not Valid' in PayPal's response
Hi, I found that the process ends here,
eval { $som = $Soap{$self}->call( $Header{$self}, $method => $request ); }; if( $@ ) { carp $@; return; }


at line 145 in the file API.pm

I don't know much of SOAP. Help is needed on how to proceed further.

Could some one please give me a clue..

Thanks in advance

Hari
Direct Responses: Write a response
Posted on 2008-01-07 17:07:32-08 by kwaping in response to 4701
Re: Getting error 10002 'Security Header is not Valid' in PayPal's response
Did you read and follow the documentation regarding testing?
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.