Changeset View
Changeset View
Standalone View
Standalone View
src/future/paypal/PhutilPayPalAPIFuture.php
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | if (!$this->future) { | ||||
throw new Exception(pht('You must set PayPal API credentials!')); | throw new Exception(pht('You must set PayPal API credentials!')); | ||||
} | } | ||||
$params['VERSION'] = '98.0'; | $params['VERSION'] = '98.0'; | ||||
$params['USER'] = $this->apiUsername; | $params['USER'] = $this->apiUsername; | ||||
$params['PWD'] = $this->apiPassword; | $params['PWD'] = $this->apiPassword; | ||||
$params['SIGNATURE'] = $this->apiSignature; | $params['SIGNATURE'] = $this->apiSignature; | ||||
$this->future = id(new HTTPSFuture($this->getHost(), $params)) | $this->future = (new HTTPSFuture($this->getHost(), $params)) | ||||
->setMethod('POST'); | ->setMethod('POST'); | ||||
} | } | ||||
return $this->future; | return $this->future; | ||||
} | } | ||||
protected function didReceiveResult($result) { | protected function didReceiveResult($result) { | ||||
list($status, $body, $headers) = $result; | list($status, $body, $headers) = $result; | ||||
Show All 17 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0