mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 09:08:09 +08:00
♻️ Rename REST endpoint for manual login
This commit is contained in:
parent
ff1df84ada
commit
ef0e7e756c
3 changed files with 12 additions and 8 deletions
|
@ -35,14 +35,15 @@ export const REST_HYDRATE_MERCHANT_PATH = '/wc/v3/wc_paypal/common/merchant';
|
|||
export const REST_PERSIST_PATH = '/wc/v3/wc_paypal/common';
|
||||
|
||||
/**
|
||||
* REST path to perform the manual connection check, using client ID and secret,
|
||||
* REST path to perform the manual connection authentication, using client ID and secret.
|
||||
*
|
||||
* Used by: Controls
|
||||
* See: AuthenticateRestEndpoint.php
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
export const REST_MANUAL_CONNECTION_PATH = '/wc/v3/wc_paypal/authenticate';
|
||||
export const REST_DIRECT_AUTHENTICATION_PATH =
|
||||
'/wc/v3/wc_paypal/authenticate/direct';
|
||||
|
||||
/**
|
||||
* REST path to generate an ISU URL for the PayPal-login.
|
||||
|
|
|
@ -11,7 +11,7 @@ import apiFetch from '@wordpress/api-fetch';
|
|||
|
||||
import {
|
||||
REST_PERSIST_PATH,
|
||||
REST_MANUAL_CONNECTION_PATH,
|
||||
REST_DIRECT_AUTHENTICATION_PATH,
|
||||
REST_CONNECTION_URL_PATH,
|
||||
REST_HYDRATE_MERCHANT_PATH,
|
||||
REST_REFRESH_FEATURES_PATH,
|
||||
|
@ -56,7 +56,7 @@ export const controls = {
|
|||
} ) {
|
||||
try {
|
||||
return await apiFetch( {
|
||||
path: REST_MANUAL_CONNECTION_PATH,
|
||||
path: REST_DIRECT_AUTHENTICATION_PATH,
|
||||
method: 'POST',
|
||||
data: {
|
||||
clientId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue