Jump to content

HUD

Member
  • Posts

    11
  • Joined

  • Last visited

Awards

This user doesn't have any awards

Profile Information

  • Gender
    Male
  • Location
    United States
  • Interests
    Coding in many languages including PHP, MYSQL, CSS, HTML, and many more.
  • Biography
    Every idea has a light, it just needs to be plugged in.
  1. I've actually fixed it now, I decided to re-code the whole page not sure what I did wrong.
  2. According to the documentations & examples it needs to be : (Which it didn't work). use PayPal\Api\Sale;$payment = Sale::get($paymentId, $api);
  3. Figured it out to be: $payment = Payment::get($paymentId, $api); Going to check the documentation real fast.
  4. Thanks, just looked into it but wasn't the problem. Still can't find it. Nothing prints if I echo something after starting tags @ line 1. $package_check = $package; That's what the code should be... still doesn't do anything.
  5. Ah, I removed it on the thread because I edited it. I had: var_dump($payerId);
  6. Looking for this ASAP, gladly appreciate any help. <3 I've also updated the code so it finalizes the PayPal checkout.. but still no results are even showing. My payment.php processing page works fine, but not this page.
  7. I personally have 3 work computers: MacBook - Only because it's slim & sleek and I like the exterior design. Has Duel bootup (Linux & Mac OSX). Primary use Linux. I use this if I'm going to school/somewhere and need to code. Dell XPS 13 9343 - Throw in bag along with MacBook if I need to diagnose problems when I'm not home -- Has Windows 7 & Linux (1TB SSD). Personally I prefer the MacBook for coding (with linux) just because how small it is. I also have another work desktop with a few different operating systems, but primarily use Linux.
  8. Hey, so I've been working on a PayPal checkout system, I finished my return success URL.. and the page doesn't show anything, no matter what. Also doesn't give me any errors (I checked the error log), and as-well checked with phpcodechecker.com and nothing. Here's my coding: <?phpuse PayPal\Api\Payment;use PayPal\Api\PaymentExecution; require '../src/start.php'; // Sanitize just in case? $approved = htmlspecialchars($_GET['approved']); $package = htmlspecialchars($_GET['package']); $userID = htmlspecialchars($_GET['userID']); $secretHash = htmlspecialchars($_GET['secretHash']); if (isset($approved) && isset($package) && isset($userID) && isset($secretHash)) { // Encrypt these $userID_enc = openssl_digest(''.$user->ID.'', 'sha512'); $secretHash_enc = openssl_digest(''.$user->privHash.'', 'sha512'); // Verify the $_GETs $approved_check = $approved === 'true'; $package_check = $package === $package; $userID_check = $userID === $userID_enc; $secretHash_check = $secretHash === $secretHash_enc; if ($approved_check && $package_check && $userID_check && $secretHash_check) { $payerId = $_GET['PayerID']; // Get payment_id from database $paymentId = $db->prepare(" SELECT payment_id FROM transactions_paypal WHERE hash = :hash "); $paymentId->execute([ 'hash' => $_SESSION['paypal_hash'] ]); // Update Transaction $updateTransaction = $db->prepare(" UPDATE transactions_paypal SET status = 'paid' WHERE payment_id = :payment_id "); $updateTransaction->execute([ 'payment_id' => $payment_id ]); $payment = $paymentId->fetchObject()->payment_id; // Accept payment $payment = Payment::get($paymentId, $api); // Charge User $execution = new PaymentExecution(); $execution->setPayerId($payerId); $payment->execute($execution, $api); } else { echo "Something went wrong."; } } else { echo "Seomething went wrong."; }
  9. HUD

    Few Questions

    I have not yet, but my concern is that the speeds that I'd recieve wouldn't be good enough for at least 2 servers running 24/7. As-well as my other devices (phones, ipads, and my other computers).
  10. HUD

    Few Questions

    Hi there, I'm here to ask for a few tips for increasing speeds. So currently I have a terrible ISP (Windstream). All they are out there to do is take your money. Last month I called them asked to upgrade from 25 Mbps to 100 Mbps package. They said it requires a router upgrade (I was using their default router).. so I said go for it. They charged me $85 for literally a $10 router that has a max capacity of 10 Mbps.. I'm wanting to get some servers for testing purposes & holding a NAS. The sad thing is, 5-10 Mbps internet isn't suited for multiple servers. I'm wondering what the best solution is.. obviously upgrade my router with decent specs & at least 1Gbps capacity. But alongside upgrading my router, what else could I do? Please help. Gladly appreciate it, thank you!
×