Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration
You are here: Home

thpwebteam

  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • October 5, 2010 at 3:43 pm in reply to: HTTP POST Method Won't Work #24942
    thpwebteam
    Member

    Brilliant! I’m not even sure how I missed something like that! Thank you so much!

    October 4, 2010 at 4:43 pm in reply to: HTTP POST Method Won't Work #24940
    thpwebteam
    Member

    Also, note that if I use the GET request it works. So something like this works:

    http://www.webdev4.com/wp-content/plugins/wp-pdf-stamper/api/stamp_api.php?secret_key=4ca4929b783ec5.XXXXXXXX&source_file=http://www.webdev4.com/wp-content/uploads/fw4.pdf&customer_name=jon doe&customer_email=jon.doe@gmail.com&customer_address=123 Some Street, San Jose, CA – 95130, U.S.A

    Post is failing, no PDF is being stamped and I’m not getting any errors.

    October 4, 2010 at 4:38 pm in reply to: HTTP POST Method Won't Work #24939
    thpwebteam
    Member

    The URL that I used is from the Integration Menu. See screenshot:

    http://www.tyndale.com/external_parties/pics/tipsandtricks_techsupport/integration_help.jpg

    I also checked that file on the web-server and it is correct.

    If you try to type in the URL you will get a 404. The domain is setup internally on our development web server.

    October 1, 2010 at 1:21 pm in reply to: HTTP POST Method Won't Work #24937
    thpwebteam
    Member

    I basically took the code below, put it in a php file, placed the file in the root, and ran it from the browser.

    <?
    /*** Mandatory data ***/
    // Post URL (Get this value from the Integration Help menu of this plugin)
    $postURL = "http://www.webdev4.com/wp-content/plugins/wp-pdf-stamp/api/stamp_api.php";
    // The Secret key (Get this value from the settings menu of this plugin)
    $secretKey = "4ca4929b783ec5.15678014"; //not actual for security purposes
    //The source file URL (The file that you want to stamp)
    $fileURL = "http://www.webdev4.com/wp-content/uploads/fw4.pdf";

    /*** Optional Data ***/
    //Customers Name
    $customerName = "John Doe";
    //Customer Email address
    $customerEmail = "john.doe@gmail.com";
    //Customer's Address
    $customerAddress = "123 Some Street, San Jose, CA - 95130, U.S.A.";

    // prepare the data
    $data = array ();
    $data['secret_key'] = $secretKey;
    $data['source_file'] = $fileURL;
    $data['customer_name'] = $customerName;
    $data['customer_email'] = $customerEmail;
    $data['customer_address'] = $customerAddress;

    // send data to post URL
    $ch = curl_init ($postURL);
    curl_setopt ($ch, CURLOPT_POST, true);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    $returnValue = curl_exec ($ch);

    // Process the return values
    list ($status, $value) = explode ("n", $returnValue);
    if(strpos($status,"Success!") !== false)
    {
    $file_url = trim($value);
    echo "The URL of the stamped file is: ".$file_url;
    }
    else
    {
    echo "An error occured while trying to stamp the file! Error details: ".$value;
    }
    ?>

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ