Download the PHP package jacobbennett/stripe-test-token without Composer

On this page you can find all versions of the php package jacobbennett/stripe-test-token. 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 stripe-test-token

Stripe Test Tokens

Latest Version on Packagist Travis

Use this to quickly create Stripe test tokens for successful and exceptional responses from Stripe.

Install

Usage

Docs

Find full descriptions at original Stripe Docs Reference

Using Methods

To use any of the methods below, call the listed method as a static on the StripeTestToken class. If you only want to return the corresponding card number, such as with Selenium or Laravel Dusk, you can call the same method on the StripeCardNumber class.

Test card numbers

Genuine card information cannot be used in test mode. Instead, use any of the following test card methods to create a successful payment token:

Method
validVisa
validVisaDebit
validMastercard
validMastercardDebit
validMastercardPrepaid
validAmex
validDiscover
validDinersClub
validJCB

Testing for specific responses and errors

The following methods can be used to create tokens that produce specific responses—useful for testing different scenarios and error codes. Verification checks only run when the required information is provided (e.g., for cvc_check to fail, a CVC code must be provided).

Method Description
successDirectToBalance Charge succeeds and funds will be added directly to your available balance (bypassing your pending balance).
addressZipFail The address_line1_check and address_zip_check verifications fail. If your account is blocking payments that fail ZIP code validation, the charge is declined.
addressFail Charge succeeds but the address_line1_check verification fails.
zipFail The address_zip_check verification fails. If your account is blocking payments that fail ZIP code validation, the charge is declined.
addressZipUnavailable Charge succeeds but the address_zip_check and address_line1_check verifications are both unavailable.
cvcFail If a CVC number is provided, the cvc_check fails. If your account is blocking payments that fail CVC code validation, the charge is declined.
customerChargeFail Attaching this card to a Customer object succeeds, but attempts to charge the customer fail.
successWithReview Charge succeeds with a risk_level of elevated and placed into review.
declineCard Charge is declined with a card_declined code.
declineFraudulentCard Charge is declined with a card_declined code and a fraudulent reason.
declineIncorrectCvc Charge is declined with an incorrect_cvc code.
declineExpiredCard Charge is declined with an expired_card code.
declineProcessingError Charge is declined with a processing_error code.
declineIncorrectNumber Charge is declined with an incorrect_number code as the card number fails the Luhn check.

Testing

In order to run the full test suite, you must have STRIPE_KEY set in your environment, as the test will hit the Stripe API in order to generate a test token.

License

This project is open-sourced software licensed under the MIT license


All versions of stripe-test-token with dependencies

PHP Build Version
Package Version
Requires stripe/stripe-php Version ^4.0|^5.0|^6.0|^7.0
php Version >=7.2|^8.0
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 jacobbennett/stripe-test-token contains the following files

Loading the files please wait ....