mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #633 from woocommerce/pcp-615-invalid-address
Retry without shipping field when got invalid address error
This commit is contained in:
commit
5cd439fa20
3 changed files with 59 additions and 8 deletions
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue