Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Checkout Laravel Package

checkout-bundle/checkout

View on GitHub
Deep Wiki
Context7

alt text

**:heavy_exclamation_mark: This library points to Checkout.com's classic API. **

Requirements

PHP 5 > 5.3.0

Symfony 2.8 > 4

How to use the library

Add the dev-master version of Checkout Symfony Bundle into your project by using Composer or manually:

Using Composer (Recommended)

Either run the following command in the root directory of your project:

composer require checkout-bundle/checkout

Or require the Checkout.com package inside the composer.json of your project:

"require": {
    "php": ">=5.2.4",
    "checkout-bundle/checkout": "dev-master"
},

Manually

Download or clone the github repository, master or download a release, and manually add it to your project.

Example

After adding the library to your project, Register the Bundle in your AppKernal.php.

 public function registerBundles()
    {
        $bundles = [
            .........
            ........
           .........
            new Checkout\PaymentBundle\CheckoutPaymentBundle(),
        ];

Add the routing for Checkout Bundle in your routing.yml

checkout_payment:
    resource: "@CheckoutPaymentBundle/Resources/config/routing.yml"
    prefix:   /

You can forword request to Checkout Controller to Initiate Payment using Checkout.js as under

In MyController.php


    /**
     * @param Request $request
     * @return \Symfony\Component\HttpFoundation\Response
     * @\Sensio\Bundle\FrameworkExtraBundle\Configuration\Route("payment")
     */
    public function create_payment(Request $request){

        return $this->forward('CheckoutPaymentBundle:Checkout:show', [
        'currency' => 'USD',
        'amount' => 10,
        'customer_name' => 'Omair Afzal',
        'cartObject' =>  null,
        'country_code' => 'US',
        'callback_url' => 'http://iam_callback_url.com',
        'timeout' => 300,
        'public_key' => 'XXXXXXXXXXX',
        'env' => 'sandbox'   //live
        ]);
    }

By default both $connectTimeout and $readTimeout are to 60 seconds. You may change them as needed.

$env accepts either 'sandbox' or 'live' as value. This parameter allow you to shift between the sandbox environment or live environment. By Default the sandbox environment will be used.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
make-dev/orca
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle
dmstr/api-platform-utils-bundle
dmstr/api-configuration-bundle
chrisdev/ux-components
baks-dev/finances
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle