【问题标题】:Paypal Adaptive Api payment error failed to open stream: HTTP request failed! HTTP/1.0 400 Bad RequestPaypal Adaptive Api payment error failed to open stream: HTTP 请求失败! HTTP/1.0 400 错误请求
【发布时间】:2016-01-22 07:24:01
【问题描述】:

我正在使用自适应网址,例如

$url = trim("https://svcs.".$sandbox."paypal.com/AdaptivePayments/Pay");

我收到此错误消息:||php 错误消息 = fopen(https://svcs.sandbox.paypal.com/AdaptivePayments/Pay): 无法打开流:HTTP 请求失败! HTTP/1.0 400 错误请求 ||

【问题讨论】:

  • 我在哪里使用 urlencode() 函数。我收到新错误:- fopen(https%3A%2F%2Fsvcs.sandbox.paypal.com%2FAdaptivePayments%2FPay):无法打开流:没有这样的文件或目录

标签: php paypal


【解决方案1】:

urlencode()试试这个:

$url = urlencode("https://svcs.".$sandbox."paypal.com/AdaptivePayments/Pay");

【讨论】:

  • 同样的错误 fopen(https%3A%2F%2Fsvcs.sandbox.paypal.com%2FAdaptivePayments%2FPay):无法打开流:没有这样的文件或目录
  • $params = array("http" => array( "method" => "POST", "content" => $body_data, "header" => "X-PAYPAL-SECURITY-USERID : " . $API_UserName . "\r\n" . "X-PAYPAL-SECURITY-SIGNATURE: " . $API_Signature . "\r\n" . "X-PAYPAL-SECURITY-PASSWORD: " . $API_Password . "\ r\n" . "X-PAYPAL-APPLICATION-ID: " . $API_AppID . "\r\n" . "X-PAYPAL-REQUEST-DATA-FORMAT: " . $API_RequestFormat . "\r\n" . " X-PAYPAL-RESPONSE-DATA-FORMAT: " . $API_ResponseFormat . "\r\n". "X-PAYPAL-DEVICE-IPADDRESS: " . $PROXY_HOST . "\r\n" ));
  • @ramesh: 试试 file_get_contents('svc'.$sandbox.'paypal.com/AdaptivePayments/Pay');
  • 我使用 $ctx = stream_context_create($params);然后 $response = stream_get_contents($fp);
猜你喜欢
  • 2022-10-02
  • 2012-12-31
  • 2015-04-10
  • 1970-01-01
  • 2012-04-08
  • 1970-01-01
  • 2014-12-14
相关资源
最近更新 更多