Git Product home page Git Product logo

mehul0810 / custom-namespaced-stripe-php-sdk Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 22 KB

This open source project will help you add custom namespace to your Stripe SDK. I'm not creating the Stripe SDK from scratch, instead you can use composer to add your specific namespace to the Stripe SDK.

License: GNU General Public License v3.0

PHP 100.00%
stripe stripe-php stripe-sdk custom-namespace composer autoloader wordpress wordpress-stripe

custom-namespaced-stripe-php-sdk's Introduction

Custom Namespaced Stripe PHP SDK

This composer plugin will help you add custom namespace to Stripe SDK for PHP so that you can easily use the custom namespaced Stripe SDK in your WordPress plugins.

Using this will help you avoid conflicts with other WordPress plugins who are using the same Stripe PHP SDK with different versions.

How to configure it for your WordPress plugin?

Add the composer.json and scoper.inc.php in your WordPress plugin for development only. Don't send this files in production.

If your WordPress plugin has its own composer.json then merge it with our composer.json file.

Additional Steps

  1. Replace the word WP\\Stripe\\ with CustomNamespace\\Stripe\\ under autoload parameter in composer.json
  2. Replace the prefix WP with CustomNamespace in scoper.inc.php

After moving the files and following the steps above, run the below mentioned command and it will automagically convert the Stripe SDK under vendor folder with your custom namespace.

$ composer install

That's it! You're done.

Troubleshooting

If you're facing issues with generating files properly or any random error arises. Then, follow the steps as mentioned:

  1. Remove composer.lock file.
  2. Clear Composer cache.
$ composer clear-cache

Special Thanks

custom-namespaced-stripe-php-sdk's People

Contributors

mehul0810 avatar

Watchers

 avatar  avatar

custom-namespaced-stripe-php-sdk's Issues

Add demo files

We need to add some demo files so that the users can know how to use the custom namespaced Stripe SDK for PHP.

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.