WordPress.org

Ready to get started?Download WordPress

Forums

WP Stripe
[resolved] Content-Type Error With Hooks (2 posts)

  1. Seth Alling
    Member
    Posted 1 year ago #

    I'm trying to run a function after a successful charge, but I'm running into an error.

    The function will run, but there is no notification of a successful transaction on the form. I've reviewed the response, and it appears that WordPress automatically converts the header back to HTML instead of json.

    At first I was trying to figure out what was wrong with my code, when I tred a blank function and got the same result.

    What the request header is outputting with a blank function hooking into wp_stripe_post_successful_charge:

    Access-Control-Allow-Credentials:true
    Access-Control-Allow-Origin:http://******.sethalling.com
    Cache-Control:no-cache, must-revalidate, max-age=0
    Connection:Keep-Alive
    Content-Encoding:gzip
    Content-Length:329
    Content-Type:text/html; charset=UTF-8
    Date:Fri, 08 Mar 2013 05:44:15 GMT
    Expires:Wed, 11 Jan 1984 05:00:00 GMT
    Keep-Alive:timeout=3, max=100
    Pragma:no-cache
    Server:Apache
    Vary:User-Agent,Accept-Encoding
    X-Content-Type-Options:nosniff
    X-Frame-Options:SAMEORIGIN
    X-Powered-By:PHP/5.3.20
    X-Robots-Tag:noindex

    What the request header outputs with no hooks:

    Access-Control-Allow-Credentials:true
    Access-Control-Allow-Origin:http://******.sethalling.com
    Cache-Control:no-cache, must-revalidate, max-age=0
    Connection:Keep-Alive
    Content-Length:147
    Content-Type:application/json
    Date:Fri, 08 Mar 2013 05:45:39 GMT
    Expires:Wed, 11 Jan 1984 05:00:00 GMT
    Keep-Alive:timeout=3, max=100
    Pragma:no-cache
    Server:Apache
    Vary:User-Agent
    X-Content-Type-Options:nosniff
    X-Frame-Options:SAMEORIGIN
    X-Powered-By:PHP/5.3.20
    X-Robots-Tag:noindex

    Any help would be appreciated. Thanks!

    http://wordpress.org/extend/plugins/wp-stripe/

  2. Seth Alling
    Member
    Posted 1 year ago #

    Well, I have not clue what the issue was, but now it's working. I've played around with so many different lines of code that I probably had something wrong, but I can't recreate the issue.

    Thanks for the great plugin!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.