Reputation: 8283
i'm using paypal's express checkout API in PHP, and the SetExpressCheckout
operation works fine. But when paypal redirect's to my page that handles the GetExpressCheckoutDetails
operation, it gives me a 10410: Invalid Token
error. I'm using the token they provide in the url, so what's the problem?
Here's the code i'm using:
$token = urldecode($this->params['url']['token']);
$req_str = 'USER=%s&PWD=%s&SIGNATURE=%s&VERSION=%s&METHOD=%s&TOKEN=%';
$req_query = sprintf($req_str, Configure::read('Paypal.username'), Configure::read('Paypal.password'), Configure::read('Paypal.signature'), "65.1", 'GetExpressCheckoutDetails', $token);
Upvotes: 0
Views: 351
Reputation: 449515
I think you are missing a s
in
$req_str = 'USER=%s&PWD=%s&SIGNATURE=%s&VERSION=%s&METHOD=%s&TOKEN=%';
HERE ----^
Upvotes: 2