Support » Developing with WordPress » WordPress stripe integration

  • I have the below website and on this page it has a downlaod button I want to connect that download button to a payment gateway so the stack flow will be

    url. download button. sends to new page to pay by credit card.

    How can I connect my download button to a payment gateway easily.

    I have tried loads of plugins but they all want to add a product page but i already have one that i am designing.

    I am using theme fusions avada latest addition if that helps?

    there seems to be a solution lacking here at the moment cant just get my button to do what I want it to do to go to a payment page. rather not send it to paypal as people and businesses get put off by that so trying to do this with skype and stripe have said contact wordpress to know how to do what i want it to do?

    ideas / code please?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Sorry should of added I want the user to fill in the form and click pay by card and all the information get sent to my email address and take payment


    I just use a downlaod button and it sends it to a payment gateway but this option is just as tricky as i cant seem to find a solution that will just connect to my own page download button?


    Moderator bcworkz


    Your first clarification of a separate payment button makes more sense to me. As a use/customer, when I click a download button, I expect a download to start. Getting sent to Stripe without warning would be off-putting. You could have two buttons – payment and download. The download button could be disabled until Stripe confirms successful payment. Confirmation and changing disabled status is handled with JavaScript or jQuery.

    You could send user data to Stripe by making Stripe the action attribute of the form, but I’m not sure how Stripe would properly respond to that in a way that is usable by your site. It seems to me that the Stripe submittal should be sent via Ajax. Then the Ajax response script can correctly handle the Stripe response and enable the download button upon successful payment.

    How to format the Ajax request depends on the Stripe API’s requirements. Ajax in WP can be a bit quirky, but it’s mainly in how WP accepts Ajax requests. Since you are sending to Stripe, most of that would not matter. The one quirk to be aware of is WP has its own jQuery library, you should not fetch it from another CDN. To enable jQuery on a page, in PHP you enqueue “jquery” from a callback added to “wp_enqueue_scripts”. See the Plugin Handbook for specifics.

    Once you’ve correctly enqueued jQuery and your payment handling script, that’s the end of WP quirks. The form and submit process is no different than any other non-WP site.

    You could use an e-commerce platform to connect your ‘download’ button to a payment gateway. can either redirect your users to a landing page to handle payments or you can embed a payment modal to keep your users on your site using their WordPress plug-in. Either way, the platform has a clean design which should make your users happy. Also, they can secure digital downloads too if your design company calls for it.

    • This reply was modified 1 year, 9 months ago by chasedev.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress stripe integration’ is closed to new replies.