File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
cron/payouts/charge-succeeded Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export async function sendPaypalPayouts({
4949 const data = await response . json ( ) ;
5050
5151 if ( ! response . ok ) {
52- console . error ( "Error creating PayPal batch payout" , data ) ;
52+ console . error ( "[PayPal] Error creating PayPal batch payout" , data ) ;
5353
5454 await log ( {
5555 message : `Error creating PayPal batch payout. Invoice ID: ${ invoiceId } . Error: ${ JSON . stringify (
Original file line number Diff line number Diff line change @@ -41,15 +41,15 @@ export async function payoutStatusChanged(event: any) {
4141
4242 if ( ! payout ) {
4343 console . log (
44- `Payout not found for invoice ${ invoiceId } and partner ${ paypalEmail } ` ,
44+ `[PayPal] Payout not found for invoice ${ invoiceId } and partner ${ paypalEmail } ` ,
4545 ) ;
4646 return ;
4747 }
4848
4949 if ( body . event_type === "PAYMENT.PAYOUTS-ITEM.SUCCEEDED" ) {
5050 if ( payout . status === "completed" ) {
5151 console . log (
52- `Payout already completed for invoice ${ invoiceId } and partner ${ paypalEmail } ` ,
52+ `[PayPal] Payout already completed for invoice ${ invoiceId } and partner ${ paypalEmail } ` ,
5353 ) ;
5454 return ;
5555 }
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export const POST = async (req: Request) => {
3535 return new Response ( "Unsupported event, skipping..." ) ;
3636 }
3737
38- console . info ( `Paypal webhook received: ${ body . event_type } ` , body ) ;
38+ console . info ( `[ Paypal] Webhook received: ${ body . event_type } ` , body ) ;
3939
4040 try {
4141 switch ( body . event_type ) {
Original file line number Diff line number Diff line change @@ -34,14 +34,14 @@ export async function verifySignature({
3434 const certUrl = headers . get ( "paypal-cert-url" ) ;
3535
3636 if ( ! transmissionId || ! transmissionSig || ! timeStamp || ! certUrl ) {
37- console . error ( "Missing required headers for signature verification" ) ;
37+ console . error ( "[PayPal] Missing required headers for signature verification" ) ;
3838 return false ;
3939 }
4040
4141 const certPem = await downloadAndCache ( certUrl ) ;
4242
4343 if ( ! certPem ) {
44- console . error ( "Failed to download or cache PayPal certificate" ) ;
44+ console . error ( "[PayPal] Failed to download or cache PayPal certificate" ) ;
4545 return false ;
4646 }
4747
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export async function createPaypalToken() {
4040 const data = await response . json ( ) ;
4141
4242 if ( ! response . ok ) {
43- console . error ( "Failed to create PayPal token." , data ) ;
43+ console . error ( "[PayPal] Failed to create PayPal token." , data ) ;
4444 throw new Error ( "Failed to create PayPal token." ) ;
4545 }
4646
You can’t perform that action at this time.
0 commit comments