hjkhghopjkertteerterterterertertrtoirh
bnmbertsurhetertertertertertertertpdf'tdfg
/
home
/
u313348419
/
domains
/
etsbay.com
/
public_html
/
Upload FileeE
HOME
<?php require 'paypalvendor/autoload.php'; require 'paypal-config.php'; use PayPal\Api\Payment; use PayPal\Api\PaymentExecution; if (isset($_GET['success']) && $_GET['success'] == 'true') { $sessionId = $_GET['sessionId']; $paymentId = $_GET['paymentId']; $payerId = $_GET['PayerID']; // Get the payment by ID $payment = Payment::get($paymentId, $apiContext); // Execute the payment $execution = new PaymentExecution(); $execution->setPayerId($payerId); try { $result = $payment->execute($execution, $apiContext); // Redirect or display success message header('Location: payments/payment_conform.php?payment_metord=online&sessionId='.$sessionId); } catch (Exception $ex) { echo 'Payment execution failed: ' . $ex->getMessage(); exit; } } else { header('Location: failure.php'); } ?>