mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
✨ New ConsoleLogger group
method
Groups subsequent console.log output, for cleaner console output
This commit is contained in:
parent
00e2959700
commit
63e9c8bf27
3 changed files with 49 additions and 7 deletions
|
@ -560,7 +560,7 @@ class GooglepayButton extends PaymentButton {
|
|||
}
|
||||
|
||||
async processPayment( paymentData ) {
|
||||
this.log( 'processPayment' );
|
||||
this.logGroup( 'processPayment' );
|
||||
|
||||
const paymentError = ( reason ) => {
|
||||
this.error( reason );
|
||||
|
@ -623,13 +623,13 @@ class GooglepayButton extends PaymentButton {
|
|||
return;
|
||||
}
|
||||
|
||||
const success = await approveOrderServerSide( id );
|
||||
const success = await approveOrderServerSide( id );
|
||||
|
||||
if ( success ) {
|
||||
resolve( this.processPaymentResponse( 'SUCCESS' ) );
|
||||
} else {
|
||||
resolve( paymentError( 'FAILED TO APPROVE' ) );
|
||||
}
|
||||
if ( success ) {
|
||||
resolve( this.processPaymentResponse( 'SUCCESS' ) );
|
||||
} else {
|
||||
resolve( paymentError( 'FAILED TO APPROVE' ) );
|
||||
}
|
||||
};
|
||||
|
||||
const propagatePayerDataToForm = () => {
|
||||
|
@ -660,6 +660,8 @@ class GooglepayButton extends PaymentButton {
|
|||
} catch ( err ) {
|
||||
resolve( paymentError( err.message ) );
|
||||
}
|
||||
|
||||
this.logGroup();
|
||||
} );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue