gpt4 book ai didi

paypal - SetExpressCheckout API 调用失败

转载 作者:太空宇宙 更新时间:2023-11-03 16:09:48 25 4
gpt4 key购买 nike

您好,有人可以帮我处理代码吗?我在处理我的网页时收到此错误:

SetExpressCheckout API 调用失败。详细错误消息:安全 header 无效简短错误消息:安全错误错误代码:10002错误严重性代码:错误

下面是我的代码;

/********************************************

PayPal API Module



Defines all the global variables and the wrapper functions



********************************************/

class Paypalrequest{









/* An express checkout transaction starts with a token, that

identifies to PayPal your transaction

In this example, when the script sees a token, the script

knows that the buyer has already authorized payment through

paypal. If no token was found, the action is to send the buyer

to PayPal to first authorize payment

*/



/*

'-------------------------------------------------------------------------------------------------------------------------------------------

' Purpose: Prepares the parameters for the SetExpressCheckout API Call.

' Inputs:

' paymentAmount: Total value of the shopping cart

' currencyCodeType: Currency code value the PayPal API

' paymentType: paymentType has to be one of the following values: Sale or Order or Authorization

' returnURL: the page where buyers return to after they are done with the payment review on PayPal

' cancelURL: the page where buyers return to when they cancel the payment review on PayPal

'--------------------------------------------------------------------------------------------------------------------------------------------

*/





var $PROXY_HOST = '127.0.0.1';

var $PROXY_PORT = '808';



var $SandboxFlag = false;



//'------------------------------------

//' PayPal API Credentials

//' Replace <API_USERNAME> with your API Username

//' Replace <API_PASSWORD> with your API Password

//' Replace <API_SIGNATURE> with your Signature

//'------------------------------------

/* var $API_UserName="USERNAMER HERE";

var $API_Password="PASSWORD HERE";

var $API_Signature="SIGNATURE HERE";*/

var $API_UserName="USERNAME HERE";

var $API_Password="PASSWORD HERE";

var $API_Signature="SIGNATURE HERE";








// BN Code is only applicable for partners

var $sBNCode = "PP-ECWizard";





/*

' Define the PayPal Redirect URLs.

' This is the URL that the buyer is first sent to do authorize payment with their paypal account

' change the URL depending if you are testing on the sandbox or the live PayPal site

'

' For the sandbox, the URL is https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token=

' For the live site, the URL is https://www.paypal.com/webscr&cmd=_express-checkout&token=

*/



var $USE_PROXY = false;

var $version="64";

var $API_Endpoint;

var $PAYPAL_URL;

public function __construct(){

$this->PROXY_HOST = '127.0.0.1';

$this->PROXY_PORT = '808';



$this->SandboxFlag = false;

/* $this->API_UserName="USERNAME HERE";

$this->API_Password="PASSWORD HERE";

$this->API_Signature="SIGNATURE HERE"; */

$this->API_UserName="USERNAME HERE";

$this->API_Password="PASSWORD HERE";

$this->API_Signature="SIGNATURE HERE";






// BN Code is only applicable for partners

$this->sBNCode = "PP-ECWizard";



if ($this->SandboxFlag == true)

{

$this->API_Endpoint = "https://api-3t.sandbox.paypal.com/nvp";

$this->PAYPAL_URL ="https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token=";

}

else

{

$this->API_Endpoint = "https://api-3t.paypal.com/nvp";

$this->PAYPAL_URL = "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=";

}



$this->USE_PROXY = false;

$this->version="64";



if (session_id() == "")

session_start();





}





public function CallShortcutExpressCheckout( $paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL,$packageName)

{

最佳答案

关于paypal - SetExpressCheckout API 调用失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21325789/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com