jinjie/stripe-product-checkout

There is no license information available for the latest version (dev-master) of this package.

A very simple stripe checkout for SilverStripe

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

dev-master 2020-03-15 05:07 UTC

This package is auto-updated.

Last update: 2024-12-15 16:08:15 UTC


README

This does not intend to be a full e-commerce solution.

Installation

composer require jinjie/stripe-product-checkout

Configuration

Add Stripe keys to .env file

STRIPE_PK="<PUBLISHABLE KEY>"
STRIPE_SK="<SECRET KEY>"

Extending

By default, only the product will be used in line_items in checkout. You can change this with something like below.

StripeProductCheckout\Controllers\ProductController:
  extensions:
    - MyProductExtension
// ...
public function updateCheckoutItems(&$items)
{
    // Manipulate $items array here to be used in line_items
}
// ...