mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add PayPal-Request-Id
if payment source exist
This commit is contained in:
parent
65c8accd5e
commit
3c7f653ca9
1 changed files with 4 additions and 0 deletions
|
@ -236,6 +236,10 @@ class OrderEndpoint {
|
|||
$args['headers']['PayPal-Client-Metadata-Id'] = $this->fraudnet->session_id();
|
||||
}
|
||||
|
||||
if ( isset( $data['payment_source'] ) ) {
|
||||
$args['headers']['PayPal-Request-Id'] = uniqid( 'ppcp-', true );
|
||||
}
|
||||
|
||||
$response = $this->request( $url, $args );
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue