forked from LiveCarta/PayPal-PHP-SDK
Stop auto-generating PayPal-Request-Id
- Allow manual setting of PayPal-Request-Id
This commit is contained in:
@@ -85,13 +85,19 @@ class ApiContext
|
||||
*/
|
||||
public function getRequestId()
|
||||
{
|
||||
if ($this->requestId == null) {
|
||||
$this->requestId = $this->generateRequestId();
|
||||
}
|
||||
|
||||
return $this->requestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the request ID
|
||||
*
|
||||
* @param string $requestId the PayPal-Request-Id value to use
|
||||
*/
|
||||
public function setRequestId($requestId)
|
||||
{
|
||||
$this->requestId = $requestId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the requestId that can be used to set the PayPal-request-id
|
||||
* header used for idempotency. In cases where you need to make multiple create calls
|
||||
|
||||
Reference in New Issue
Block a user