Git Product home page Git Product logo

stripe's Introduction

#Stripe

Stripe payments extension for Symphony CMS. This extension allows direct access to Stripe's API using Symphony CMS concepts; no PHP is necessary.

##Usage

The Symphony CMS Stripe Extension uses filters at its heart to carry out Stripe API calls.

In order to use this extension it will be important to become familiar with the required arguments and responses of each filter. If you want response data saved from the Stripe response into a section, that section needs to have the filter and the section's field handles must match Stripe's response (_ are automatically converted into -, and vice a versa). This allows the greatest flexibility allowing the Symphony CMS developer to choose what information they want to save in the section.

Use the Stripe: Webhooks Router event in combination with events that have a webhook filter.

##Filters Interacting with your Stripe account is done by applying filters to events. Only apply a single Stripe filter to an event. You could try doing more than one filter but it's not something I have considered - mileage may vary.

Filters have required fields. Additional information regarding arguments can be obtained from the individual links below. To pass arguments to the filter to be used in the Stripe API call, prefixed names with stripe. For instance:

<input type="hidden" value="cus_0ZZPeHkzl4MacV" name="stripe[id]" />

In the above example, the filter will pass this field value as an 'id` argument. If the Stripe API call is successful, the filter will include any response from Stripe and add it to the event's fields array prior to saving into the Symphony section.

####Create Customer

https://stripe.com/docs/api?lang=php#create_customer

####Update Customer

https://stripe.com/docs/api?lang=php#update_customer

####Delete Customer

https://stripe.com/docs/api?lang=php#delete_customer

####Update Customer Subscription

https://stripe.com/docs/api?lang=php#update_subscription

####Cancel Customer Subscription

https://stripe.com/docs/api?lang=php#cancel_subscription

####Delete Customer Discount

https://stripe.com/docs/api?lang=php#delete_discount

####Create Charge

https://stripe.com/docs/api?lang=php#create_charge

####Refund Charge

https://stripe.com/docs/api?lang=php#refund_charge

####Create Invoice Item

https://stripe.com/docs/api?lang=php#create_invoiceitem

####Create Invoice

https://stripe.com/docs/api?lang=php#create_invoice

####Update Invoice Item

https://stripe.com/docs/api?lang=php#update_invoiceitem

####Update Invoice

https://stripe.com/docs/api?lang=php#update_invoice

####Delete Invoice Item

https://stripe.com/docs/api?lang=php#delete_invoiceitem

####Pay Invoice

https://stripe.com/docs/api?lang=php#pay_invoice

###Webhook Filters

Webhook Filters must be accompanied by the Stripe: Webhook Router event for them to be executed.

####Stripe Webhook: Customer

https://stripe.com/docs/api?lang=php#customers

####Stripe Webhook: Charge

https://stripe.com/docs/api?lang=php#charges

####Stripe Webhook: Invoice

https://stripe.com/docs/api?lang=php#invoices

####Stripe Webhook: Invoice Item

https://stripe.com/docs/api?lang=php#invoiceitems

####Stripe Webhook: Transfer

https://stripe.com/docs/api?lang=php#transfers

stripe's People

Contributors

lewiswharf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stripe's Issues

More explanation on how this works

I've also got some questions along the lines of patrickyan about how to get this thing up and running

I made an event called Checkout_submit that has the filter Stripe: Create Charge attached to it. I then attach that event to the page /shopping-cart/checkout/submit/

My form is on another page and looks like the following:

<form method="POST" action="mysite.com/shopping-cart/checkout/submit"</xsl:attribute>
                    <label>Country
                        <select name="stripe[address_country]" class="long" id="country">
                            <option name="US">United States</option
                        </select>
                    </label>
                    <label>Full Name
                        <input type="text" class="medium" name="stripe[name]" value=""/>
                    </label>
                    <label>Address 1
                        <input type="text" class="long" name="stripe[address-line1]" value=""/>
                    </label>
                    <label>Address 2
                        <input type="text" class="long" name="stripe[address_line2]" value=""/>
                    </label>
                    <label>City
                        <input type="text" class="long" name="stripe[address_city]" value=""/>
                    </label>
                    <label>Order Total
                        <input type="text" name="stripe[amount]" class="medium" disabled="disabled" value="15">
                        </input>
                    </label>
                    <label>Card Number
                        <input type="text" name="stripe[card][number]" class="long" placeholder="XXXX-XXXX-XXXX-XXXX" />
                    </label>
                    <label>Verification Code
                        <input type="text" name="stripe[card][cvc]" class="short" placeholder="123(4)" />
                    </label>
                    <label>Expiration
                        <input type="text" name="javascript-splitdate" class="short" placeholder="MM/YY"/>
                    </label>
                        <button name="action[checkout-submit]" type="submit" value="Submit">Submit Order</button>
            </form>

When I submit this form to the page with event, I get no response in datasource indicating anything happened. Nothing in the node or anything else. Is there something I'm missing?

Explanation of how this extension works

On the forum thread, you mention some sections and fields, but it looks like that was actually before you made the extension.

I get that you pass all the arguments with inputs stripe[blah]. But how does this translate into your Symphony sections?

E.g., after you create a customer, how does the stripe customer ID (example response) get into your Symphony users section? Likewise with the charges.

And along with that, what's the customer link for?

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.