mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
Add PayPal order id into WC order meta
This commit is contained in:
parent
150d29c0b4
commit
53de52e2d3
9 changed files with 40 additions and 1 deletions
|
@ -145,8 +145,15 @@ class Orders {
|
|||
|
||||
$status_code = (int) wp_remote_retrieve_response_code( $response );
|
||||
if ( $status_code !== 200 ) {
|
||||
$body = json_decode( $response['body'] );
|
||||
|
||||
$message = $body->details[0]->description ?? '';
|
||||
if ( $message ) {
|
||||
throw new RuntimeException( $message );
|
||||
}
|
||||
|
||||
throw new PayPalApiException(
|
||||
json_decode( $response['body'] ),
|
||||
$body,
|
||||
$status_code
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue