mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 09:08:09 +08:00
♻️ Prevent upading clientId/secret via REST
This commit is contained in:
parent
6167955374
commit
bd7bbb36b2
2 changed files with 8 additions and 10 deletions
|
@ -57,14 +57,14 @@ class CommonSettings extends AbstractDataModel {
|
||||||
return array(
|
return array(
|
||||||
'use_sandbox' => false,
|
'use_sandbox' => false,
|
||||||
'use_manual_connection' => false,
|
'use_manual_connection' => false,
|
||||||
'client_id' => '',
|
|
||||||
'client_secret' => '',
|
|
||||||
|
|
||||||
// Details about connected merchant account.
|
// Details about connected merchant account.
|
||||||
'merchant_connected' => false,
|
'merchant_connected' => false,
|
||||||
'sandbox_merchant' => false,
|
'sandbox_merchant' => false,
|
||||||
'merchant_id' => '',
|
'merchant_id' => '',
|
||||||
'merchant_email' => '',
|
'merchant_email' => '',
|
||||||
|
'client_id' => '',
|
||||||
|
'client_secret' => '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,14 +50,6 @@ class CommonRestEndpoint extends RestEndpoint {
|
||||||
'js_name' => 'useManualConnection',
|
'js_name' => 'useManualConnection',
|
||||||
'sanitize' => 'to_boolean',
|
'sanitize' => 'to_boolean',
|
||||||
),
|
),
|
||||||
'client_id' => array(
|
|
||||||
'js_name' => 'clientId',
|
|
||||||
'sanitize' => 'sanitize_text_field',
|
|
||||||
),
|
|
||||||
'client_secret' => array(
|
|
||||||
'js_name' => 'clientSecret',
|
|
||||||
'sanitize' => 'sanitize_text_field',
|
|
||||||
),
|
|
||||||
'webhooks' => array(
|
'webhooks' => array(
|
||||||
'js_name' => 'webhooks',
|
'js_name' => 'webhooks',
|
||||||
),
|
),
|
||||||
|
@ -81,6 +73,12 @@ class CommonRestEndpoint extends RestEndpoint {
|
||||||
'merchant_email' => array(
|
'merchant_email' => array(
|
||||||
'js_name' => 'email',
|
'js_name' => 'email',
|
||||||
),
|
),
|
||||||
|
'client_id' => array(
|
||||||
|
'js_name' => 'clientId',
|
||||||
|
),
|
||||||
|
'client_secret' => array(
|
||||||
|
'js_name' => 'clientSecret',
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue