Giter Site home page Giter Site logo

ti-ext-squarebyweight's Introduction

Square By Weight

Square By Weight is an extension of igniter/payregister's square payment method which handles delayed token billing in the following use-case:

  • site has cupnoodles.priceByWeight enabled to allow for individual items to be priced according to weight
  • site has cupnoodles.orderMenuEdit enabled to allow editing of orders after they've been packaged.
  • site does not use customer profiles

If all of these criteria are met, then Square By Weight will create a payment method that defaults to igniter.payregister's square payment when an order contains only fixed-price items. When an order contains editable quantity items, Square by Weight will create a payment profile on Square for the customer under the email address and order number, and save the card token for later use.

Dependancies

Installation

Clone these files into extensions/cupnoodles/squarebyweight/.

Usage

SquareByWeight extends the Order class, for the sole reason of allowing a checkout process to complete without the order.processed payment proccessing flag having been set. In order for the delayed payment option to work, you'll need to replace the [Order] tag in your checkout page template with [OrderByWeight].

in (probably) <your_theme>/_pages/checkout/success.blade.php

replace

'[order]':
    hideReorderBtn: 1

with

'[orderPageByWeight]':
    hideReorderBtn: 1

Don't forget to set a paid/unpaid status in the payment settings so your staff knows which orders still need to be paid for!

ti-ext-squarebyweight's People

Contributors

cupnoodles avatar

Stargazers

Dheia avatar

Watchers

 avatar

Forkers

breaksecurity

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.