mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
♻️ Apply more accurate authentication naming
- “authenticate” instead of “connect” - “withCredentials” instead of “direct” - “OAuth” instead of “ISU”
This commit is contained in:
parent
ac68aa7968
commit
1bf6e488a3
5 changed files with 22 additions and 22 deletions
|
@ -44,7 +44,7 @@ export const useHandleOnboardingButton = ( isSandbox ) => {
|
|||
const { productionOnboardingUrl } = CommonHooks.useProduction();
|
||||
const products = OnboardingHooks.useDetermineProducts();
|
||||
const { withActivity } = CommonHooks.useBusyState();
|
||||
const { connectViaAuthCode } = CommonHooks.useAuthentication();
|
||||
const { authenticateWithOAuth } = CommonHooks.useAuthentication();
|
||||
const [ onboardingUrl, setOnboardingUrl ] = useState( '' );
|
||||
const [ scriptLoaded, setScriptLoaded ] = useState( false );
|
||||
const timerRef = useRef( null );
|
||||
|
@ -127,7 +127,7 @@ export const useHandleOnboardingButton = ( isSandbox ) => {
|
|||
ACTIVITIES.CONNECT_ISU,
|
||||
'Validating the connection details',
|
||||
async () => {
|
||||
await connectViaAuthCode(
|
||||
await authenticateWithOAuth(
|
||||
sharedId,
|
||||
authCode,
|
||||
environment
|
||||
|
@ -148,7 +148,7 @@ export const useHandleOnboardingButton = ( isSandbox ) => {
|
|||
// Ensure the onComplete handler is not removed by a PayPal init script.
|
||||
timerRef.current = setInterval( addHandler, 250 );
|
||||
},
|
||||
[ connectViaAuthCode, withActivity ]
|
||||
[ authenticateWithOAuth, withActivity ]
|
||||
);
|
||||
|
||||
const removeCompleteHandler = useCallback( () => {
|
||||
|
@ -211,7 +211,7 @@ export const useDirectAuthentication = () => {
|
|||
useConnectionBase();
|
||||
const { withActivity } = CommonHooks.useBusyState();
|
||||
const {
|
||||
connectViaSecret,
|
||||
authenticateWithCredentials,
|
||||
isManualConnectionMode,
|
||||
setManualConnectionMode,
|
||||
clientId,
|
||||
|
@ -234,7 +234,7 @@ export const useDirectAuthentication = () => {
|
|||
}
|
||||
}
|
||||
|
||||
const res = await connectViaSecret();
|
||||
const res = await authenticateWithCredentials();
|
||||
|
||||
if ( res.success ) {
|
||||
await handleCompleted();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue