github.com/elliott5/community@v0.14.1-0.20160709191136-823126fb026a/documize/section/stripe/stripe.go (about)

     1  // Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
     2  //
     3  // This software (Documize Community Edition) is licensed under
     4  // GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
     5  //
     6  // You can operate outside the AGPL restrictions by purchasing
     7  // Documize Enterprise Edition and obtaining a commercial license
     8  // by contacting <sales@documize.com>.
     9  //
    10  // https://documize.com
    11  
    12  package stripe
    13  
    14  import (
    15  	"net/http"
    16  
    17  	"github.com/documize/community/documize/section/provider"
    18  )
    19  
    20  // Provider represents Stripe
    21  type Provider struct {
    22  }
    23  
    24  // Meta describes us
    25  func (*Provider) Meta() provider.TypeMeta {
    26  	section := provider.TypeMeta{}
    27  
    28  	section.ID = "cb597d8d-c724-4034-b272-e8d9e261444f"
    29  	section.Title = "Stripe"
    30  	section.Description = "Online and mobile payments, refunds and transfers"
    31  	section.ContentType = "stripe"
    32  	section.Preview = true
    33  
    34  	return section
    35  }
    36  
    37  // Command stub.
    38  func (*Provider) Command(ctx *provider.Context, w http.ResponseWriter, r *http.Request) {
    39  	provider.WriteEmpty(w)
    40  }
    41  
    42  // Render just sends back HMTL as-is.
    43  func (*Provider) Render(ctx *provider.Context, config, data string) string {
    44  	return data
    45  }
    46  
    47  // Refresh just sends back data as-is.
    48  func (*Provider) Refresh(ctx *provider.Context, config, data string) string {
    49  	return data
    50  }