我们有以下代码将买家的详细信息转移到PayPal:
$ShippingAddr = new AddressType;
// more code ...
$ShippingAddr->Phone = $_userdata['user_phone'];
$BillingAddr = new AddressType;
// more code ...
$BillingAddr->Phone = $_userdata['user_phone'];
$setECReqDetails = new SetExpressCheckoutRequestDetailsType();
// more code ...
$setECReqDetails->Address = $ShippingAddr;
$setECReqDetails->BillingAddress = $BillingAddr;
$setECReqType = new SetExpressCheckoutRequestType();
$setECReqType->Version = '104.0';
$setECReqType->SetExpressCheckoutRequestDetails = $setECReqDetails;
$setECReq = new SetExpressCheckoutReq();
$setECReq->SetExpressCheckoutRequest = $setECReqType;
$setECResponse = $paypalService->SetExpressCheckout($setECReq);
除了PayPal结账网站上仍然空白的电话号码外,工作正常。 知道我们做错了吗?
答案 0 :(得分:0)
我相信您正在尝试根据此Web服务获取用户信息。 https://developer.paypal.com/docs/api/#get-user-information
所以你应该根据paypal文档这样调用它,
$_userdata['phone_number'];