Retry without shipping field when got invalid address error

This commit is contained in:
Alex P 2022-05-04 16:23:54 +03:00
parent c3887bec7a
commit d63f89a4a2
3 changed files with 59 additions and 8 deletions

View file

@ -175,6 +175,15 @@ class PurchaseUnit {
return $this->shipping;
}
/**
* Sets shipping info.
*
* @param Shipping|null $shipping The value to set.
*/
public function set_shipping( ?Shipping $shipping ): void {
$this->shipping = $shipping;
}
/**
* Returns the reference id.
*

View file

@ -119,4 +119,13 @@ class PayPalApiException extends RuntimeException {
public function issues(): array {
return $this->response->issues ?? array();
}
/**
* The HTTP status code.
*
* @return int
*/
public function status_code(): int {
return $this->status_code;
}
}