paypalエクスプレスチェックアウトAPIで下記のエラーが出る場合の対処
[code]
L_ERRORCODE0=10002
L_SHORTMESSAGE0=Security error
L_LONGMESSAGE0=Security header is not valid
[/code]
広告
目次
認証情報をよく確認しましょう
今回私が経験したエラーの原因はSIGNATUREの記述間違いでした。
試しにUSERを間違った値にしても同じエラーが出るようなので、上記エラーが出た場合は再度APIの認証情報をよく確認してみることをオススメします。
他のエラーも試してみる
せっかくなので、他の値を不正な値にしてどんなエラーが出るか試してみた。
PAYMENTREQUEST_0_AMTを空の値にしてみる
[code]
L_ERRORCODE0=10400
L_SHORTMESSAGE0=Transaction refused because of an invalid argument. See additional error messages for details
L_LONGMESSAGE0=Order total is missing
[/code]
PAYMENTREQUEST_0_AMTを0にしてみる
[code]
L_ERRORCODE0=10525
L_SHORTMESSAGE0=Invalid Data
L_LONGMESSAGE0=This transaction cannot be processed. The amount to be charged is zero
[/code]
PAYMENTREQUEST_0_CURRENCYCODEに不正な値 JP を入れてみる
[code]
L_ERRORCODE0=99998
L_SHORTMESSAGE0=Transaction refused because of an invalid argument. See additional error messages for details
L_LONGMESSAGE0=Currency is not supported
[/code]
RETURNURLを空にしてみる
[code]
L_ERRORCODE0=99998
L_SHORTMESSAGE0=Transaction refused because of an invalid argument. See additional error messages for details
L_LONGMESSAGE0=ReturnURL is missing
[/code]
RETURNURLに不正な値を入れている
[code]
L_ERRORCODE0=10471
L_SHORTMESSAGE0=Transaction refused because of an invalid argument. See additional error messages for details
L_LONGMESSAGE0==ReturnURL is invalid
[/code]