Download the PHP package c975l/payment-bundle without Composer

On this page you can find all versions of the php package c975l/payment-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package payment-bundle

PaymentBundle

PaymentBundle does the following:

This Bundle relies on the use of Stripe and its PHP Library. So you MUST have a Stripe account. It is also recomended to use this with a SSL certificat to reassure the user.

PaymentBundle dedicated web page.

PaymentBundle API documentation.

Bundle installation

Step 1: Download the Bundle

v3.x works with Symfony 4.x. Use v2.x for Symfony 3.x Use Composer to install the library

Step 2: Configure the Bundle

Check dependencies for their configuration:

c975LPaymentBundle uses c975L/ConfigBundle to manage configuration parameters. Use the Route "/payment/config" with the proper user role to modify them.

Step 3: Enable the Routes

Then, enable the routes by adding them to the /config/routes.yaml file of your project:

Step 4: Create MySql table

You can use php bin/console make:migration to create the migration file as documented in Symfony's Doctrine docs OR use /Resources/sql/payment.sql to create the tables stripe_payment. The DROP TABLE is commented to avoid dropping by mistake.

Step 5: copy images to web folder

Install images by running

It will copy content of folder Resources/public/images/ to your web folder. They are used to be displayed on the payment form.

You can also have a look at official badges from Stripe.

How to use

The process is the following:

To achieve this, you have to define 2 Controller Routes and 2 Services methods (+ Interface) (while you can do all of this in Controller, Best Practices recommend to keep Controller methods skinny).

Here are the examples for those files:

Use the testing cards to test before going to production.

Merchant's data

You need to override the template fragments/merchantData.html.twig in your /templates/bundles/c975LPaymentBundle/fragments/merchantData.html.twig and indicate there all your official data, such as address, VAT number, etc.

This template will be included in the email sent to the user after its payment.

Mention payment system

You can mention the payment system used (i.e. in the footer) by simply include an html fragment with the following code {% include '@c975LPayment/fragments/paymentSystem.html.twig' %}. This will include Stripe logo and accepted cards.

Use payment buttons/links

You can add any payment button/link, wherever you want, by using the Twig extensions with the following code:

AMOUNT is the real amount (i.e. 12.92), NOT the amount in cents.

Or you can use it empty, this will lead user fo fill a form to proceed to payment

If this project help you to reduce time to develop, you can sponsor me via the "Sponsor" button at the top :)


All versions of payment-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
c975l/config-bundle Version *
c975l/email-bundle Version *
c975l/services-bundle Version *
c975l/toolbar-bundle Version *
doctrine/doctrine-bundle Version *
doctrine/orm Version *
stripe/stripe-php Version *
symfony/form Version *
symfony/security-bundle Version *
symfony/translation Version *
twig/intl-extra Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package c975l/payment-bundle contains the following files

Loading the files please wait ....