Git Product home page Git Product logo

wpstripewebhook's Introduction

WPStripeWebhook

Wordpress stripe webhook plugin

Helps integrating stripe webhooks on wordpress. Base code is from Pippins plugin.

Usage

Copy the complete folder WPStripeWebhook in wp-content/plugins.
Go to website admin page.
Activate the WP Stripe webhook plugin for plugins section.
After this Settings will start showing Stripe webhook settings section. Click on it.
In the page fill the stripe keys and check test mode option if you want to test the plugin.
In WPStripeWebhook/includes/stripe_listener.php, make changes for your event type and email or whatever you want to do in response to     an event. It currently sends out an email.

Important notes and suggestions

For live mode, add stripe webhook endpoint (stripe account -> settings -> account settings -> webhook) like this

https://yourdomain.com?webhook-listener=stripe

For testing locally on your machine, you can use Ultrahook. Its awesome! Set up your keys and username and start ultrahook on your machine using:

ultrahook -k your_ultrahook_key stripe 8888

Add a webhook endpoint url in your stripe account similar to this:

http://stripe.your_ultrahook_username.ultrahook.com/your_wp_website_folder_name/stripe-listener.php?webhook-listener=stripe

And it should start working for you. Also, you might see 404 in ultrahook console. Just ignore it. I would suggest setting up debugging too. It really helps. For debugging, add these to your wp_config.php

define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
define( 'SCRIPT_DEBUG', true );

After this, you should see a debug.log file in your wp-content folder and it will display errors and warnings and whatever you print using error_log()

Author

Amrata Baghel, [email protected]

Portfolio

wpstripewebhook's People

Contributors

amratab avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.