0
사이트를 만들고 있는데 지불 만 추가하고 있습니다.
Paypal SDK을 사용 중이며 설정이 SetExpressCheckout()
입니다. 여기 PayPal에 내 CancelURL이 유효하지 않습니까?
object(SetExpressCheckoutResponseType)[72]
public 'Token' => null
public 'Timestamp' => string '2012-08-23T15:21:15Z' (length=20)
public 'Ack' => string 'Failure' (length=7)
public 'CorrelationID' => string 'e0278e8e18b4f' (length=13)
public 'Errors' =>
object(ErrorType)[78]
public 'ShortMessage' => string 'Transaction refused because of an invalid argument. See additional error messages for details.' (length=94)
public 'LongMessage' => string 'CancelURL is invalid.' (length=21)
public 'ErrorCode' => string '10472' (length=5)
public 'SeverityCode' => string 'Error' (length=5)
public 'ErrorParameters' => null
public 'Version' => string '93.0' (length=4)
public 'Build' => string '3556406' (length=7)
내가 무슨 일이야 모르겠어요, 응답이다. 내
CancelURL
은
urlencode('https://www.example.com/users/account/');
처럼 보입니다. 나는 사람들이 그것이 무효가 될 수 있다고 생각하는 후행 슬래시를 포함 시켰습니다.
내가 생각할 수있는 유일한 점은 내 사이트가 온라인이 아니기 때문에 Paypal이 페이지에 접속할 수 없기 때문입니다. 더미 페이지를 작성하여 서버의 /users/account/
에 업로드 했으므로 연결할 수 있고 아직 아무것도 없습니다. 또한 내 etc/hosts
에 example.com
트래픽을 내 로컬 호스트에 라우팅하는 항목이 있습니다.이 내 로컬 호스트는 내 Facebook 인증 비트에 올바르게 작동합니다.
아무에게도 CancelURL에 대한 제한 사항과 PayPal에서 내 요청을 실행하는 이유에 대한 아이디어가 있습니까?
는요청 세대
$int = new PayPalAPIInterfaceServiceService();
$amount = new BasicAmountType();
$amount->currencyID = CakeSession::read('Locale.currency');
$amount->value = Configure::read('Subscription.price.'.CakeSession::read('Locale.shortname'));
$req_details_type = new SetExpressCheckoutRequestDetailsType();
$req_details_type->OrderTotal = $amount;
$req_details_type->ReturnURL = urlencode('https://www.example.com/paypal/getExpressCheckoutDetails');
$req_details_type->CancelURL = urlencode('https://www.example.com/users/account/');
$req_details_type->MaxAmount = $amount;
$req_details_type->OrderDescription = "Monthly subscription to Example.com Pro";
$req_details_type->ReqConfirmShipping = 0;
$req_details_type->NoShipping = 1;
$req_details_type->LocaleCode = CakeSession::read('Locale.shortname') == 'usa'? 'US' : 'GB';
$req_details_type->PaymentAction = 'Authorization';
$req_details_type->BuyerEmail = AuthComponent::user('email');
$req_details_type->BrandName = urlencode("Example.com");
$req_type = new SetExpressCheckoutRequestType();
$req_type->SetExpressCheckoutRequestDetails = $req_details_type;
$req = new SetExpressCheckoutReq();
$req->SetExpressCheckoutRequest = $req_type;
$response = $int->SetExpressCheckout($req);
var_dump($response);
실제 SetExpressCheckout API 요청 (자격 증명 빼기) 사본을 포함 할 수 있습니까? – Robert
나는 실제 SetExpressCheckout API 요청을 의미했다. 그래서 var_dump ($ request)의 출력. :-) – Robert
@ 로버트 그게 전부 야. 앞에서 언급했듯이 Paypal SDK를 사용 중이므로 요청은 세 가지 수업으로 구성되어 있습니다. –