Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8507331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:50:29+00:00 2026-06-11T02:50:29+00:00

I implemented a dynamic button buy now (not saved in my PayPal account) with

  • 0

I implemented a dynamic button “buy now” (not saved in my PayPal account) with IPN and it works fine (yeah!).

Now I have a doubt about his security, because if someone change with firebug (for example) the amount value, the transaction is valid for paypal also if my IPN listener says there is a problem with amount.

My question is “Can I encrypt the form with a php / codeigniter library?”

Because I tried to check amount in the IPN listener, but the transaction on paypal continue correctly and It isn’t blocked from IPN.

Here, you find a part of my listener code:

private function isVerifiedIPN(){

    $req = 'cmd=_notify-validate';
    $posts = $this->input->post();
    foreach ($posts as $key => $value){
        $value = urlencode(stripslashes($value));
        $req .= "&$key=$value";
    }

    if($this->config->item('SIMULATION'))
        $url = $this->config->item('SIMULATION_URL');
    else
        $url = $this->config->item('PRODUCTION_URL');


    if(!$this->isVerifiedAmmount() ||
    !$this->isPrimaryPayPalEmail() ||
    !$this->isNotProcessed()){
        $req = '';
    }

    $header = "POST /cgi-bin/webscr HTTP/1.0\r\n";
    $header .= "Host: $url\r\n"; //443
    $header .= "Content-type: application/x-www-form-urlencoded\r\n";
    $header .= "Content-length: " . strlen($req) . "\r\n\r\n";

    $fp = fsockopen ("ssl://$url", 443, $errno, $errstr, 30);

    if (!$fp)
    {
        $this->sendReport("Errore connessione socket");
        return FALSE;
    }
    else
    {
        fputs ($fp, $header . $req);
        while (!feof($fp))
        {
            $res = fgets ($fp, 1024);
            if (strcmp($res, "VERIFIED") == 0)
            {
                // transizione valida
                fclose ($fp);
                return TRUE;
            }
            else if (strcmp ($res, "INVALID") == 0)
            {
                $this->sendReport('Transizione non valida');
                fclose ($fp);
                return FALSE;
            }
        }
    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:50:31+00:00Added an answer on June 11, 2026 at 2:50 am

    You can dynamically encrypt buttons so that people with Firebug (or similar software) can’t edit them. The PayPal API library has an example of this you can use, but I can’t find it again right now.

    This PayPal help file explains how to get the various keys you need using your server command line.

    I also found a tutorial and a certificate builder (I didn’t use, so can’t confirm how secure it is…)

    Once you’ve generated your key and certificate, you need to put them on your server and set DEFAULT_EWP_PRIVATE_KEY_PATH and DEFAULT_EWP_CERT_PATH to the relevant files.

    Upload the public certificate to PayPal (instructions in linked tutorials), and set DEFAULT_CERT_ID to the Cert ID it gives you for that file. It’ll also give you a file you can download – add that to your server and set PAYPAL_CERT_PATH to the path for that file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small dynamic site implemented in mod_python . I inherited this, and
I implemented the Facebook registration on my website. Everything works fine except that suddenly
I have implemented a custom button as follows. UIButton *mainBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [mainBtn
I'm trying to implement a Paypal button with a dynamic value. When I enter,
Background: I have implemented a normal Facebook Like Button to my page using XFBML.
I have implemented a generic IPropertyChangedNotifier using castle dynamic proxy. Here I intercept setter
I have Asp.net application that implemented with Dynamic Data technology. All data from my
I have a dynamic application that need to create a window interface with checkbox.
I have implemented a large list of views in a UIScrollView. I cannot use
Currently, I am doing a project for students' hostel and now I have to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.