Results 1 to 2 of 2

Thread: Passing a variable to a PHP payment processor

  1. #1
    Join Date
    Mar 2010
    Posts
    13

    Default Passing a variable to a PHP payment processor

    Hello all


    I'm trying to use a payment processor to pick up a hidden field in my form. I can't however, pass a value.


    I want to raise a variable called passnodecimal and pass it to the payment processor. The payment processor is written in PHP so I have used $TEMPLATEURL to tell formmail where to send the data.


    In may main form I have specified:


    <input type="hidden" name="passnodecimal" value="2500">


    In formail.php I have specified:


    $SESSION_ACCESS = array("passnodecimal");


    In the sample PHP form supplied by the payment processor, a part reads:


    /*
    In this example these values are hardcoded. In reality you may pass
    these values from another script or take it from a database.
    */
    $amount = "3000";


    So I have changed it to:


    $amount = $_SESSION["passnodecimal"];


    …after which it will be concatenated with a few other variables in the PHP and mangled into an MD5 hash.


    This is the only value I need to pass, since the others are non-changing (currency, merchant number etc) or generated on-the-fly by the PHP itself (timestamp, order ID etc).


    How can I get that value passed across? I know its something to do with session variables, but I'm stumped! Can anyone help?


    Thanks

  2. #2
    Join Date
    Mar 2010
    Posts
    13

    Default Re: Passing a variable to a PHP payment processor

    I solved it- I just thought I'd post here in case anyone else had my problem.

    I needed to place:

    PHP Code:
    <?php session_start(); ?>
    In my goodtemplate.php. And it needed to be right at the top, It didn't work further down the PHP page which is why I was getting confused...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Using with another form processor
    By sidusdata in forum Community Support
    Replies: 0
    Last Post: 05-Dec-2012, 04:41 PM
  2. Payment Form Doesn't Work in Chrome
    By BlueChannel in forum Community Support
    Replies: 3
    Last Post: 07-Sep-2010, 10:42 PM
  3. recipients required in both form and processor?
    By drbeamer in forum Community Support
    Replies: 1
    Last Post: 02-Jul-2010, 05:51 AM
  4. Passing Variable through Good_URL (Thank You Page)
    By webdev in forum Community Support
    Replies: 3
    Last Post: 14-Jun-2009, 07:26 PM
  5. Passing a variable
    By rdkelsey13 in forum HOWTO Guides and Tips
    Replies: 1
    Last Post: 02-Mar-2009, 11:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •