Documentation
¶
Index ¶
- Constants
- type Cart
- type Fetch
- type FetchService
- type Merchant
- type MerchantService
- type MerchantSlice
- type Notification
- type NotificationService
- type Order
- type OrderService
- type Payment
- type PaymentService
- type PriceMoney
- type PurchaseTotal
- type Refund
- type RefundService
- type Request
- type Security
- type SecurityService
- type Subscription
- type SubscriptionService
Constants ¶
View Source
const ( SORT_COLUMN_DATE = "created_at" SORT_COLUMN_NAME = "name" SORT_ORDER_DESC = "desc" SORT_ORDER_ASC = "asc" FETCH_TYPE_REQUEST = "REQUEST" FETCH_TYPE_PAYMENT = "PAYMENT" FETCH_TYPE_REFUND = "REFUND" FETCH_TYPE_SUBSCRIPTION = "SUBSCRIPTION" FETCH_TYPE_NOTIFICATION = "NOTIFICATION" NOTIFICATION_TYPE_PAYMENT = "payment:created" NOTIFICATION_TYPE_REFUND = "refund:created" )
View Source
const ( // MERCHANTSERVICE ... MERCHANTSERVICE string = "merchant_service" // ORDERSERVICE ... ORDERSERVICE string = "order_service" // FETCHSERVICE ... FETCHSERVICE string = "fetch_service" // PAYMENTSERVICE ... PAYMENTSERVICE string = "payment_service" // REFUNDSERVICE ... REFUNDSERVICE string = "refund_service" // SECURITYSERVICE ... SECURITYSERVICE string = "security_service" // PASSWORDSERVICE ... PASSWORDSERVICE string = "password_service" // MERCHANTSERVICE ... NOTIFY_MERCHANTSERVICE string = "merchant_service" // SUBSCRIPTIONSERVICE ... NOTIFY_SUBSCRIPTIONSERVICE string = "subscription_service" // NOTIFICATIONSERVICE ... NOTIFY_NOTIFICATIONSERVICE string = "notification_service" // FETCHSERVICE ... NOTIFY_FETCHSERVICE string = "fetch_service" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cart ¶
type Cart struct { // Indicates the e-commerce platform or // personal website from where the customer // and order originates from. For example // Shopify, Wordpress, Magento, Custom. // // The value provided is trimmed and lowered Source string `json:"source,omitempty"` // This is the external order id or cart id to // be associated with this payment. Is useful // to reconcile payments with an external source // or CMS OrderReference string `json:"order_reference,omitempty"` // This is the URL to redirect the customer to after // they have completed the payment. This can be a // success page, order confirmation page or thank you // page. CompleteURL string `json:"complete_url,omitempty"` // This is the URL to redirect the customer to after // they cancel the payment or leave it abandoned. This // is usually the cart url so they can go back to your // site and complete the payment using a different // payment method CancelURL string `json:"cancel_url,omitempty"` }
type Merchant ¶
type Merchant struct { RegisteredName string `json:"registered_name"` WebsiteURL string `json:"website_url,omitempty"` TwitterURL string `json:"twitter_url,omitempty"` InstagramURL string `json:"instagram_url,omitempty"` ProfileImgURL string `json:"profile_img_url,omitempty"` BackgroundImgURL string `json:"background_img_url,omitempty"` }
Merchant in the Sfpy ecosystem
type MerchantService ¶
type MerchantService struct {
Merchant *Merchant `json:"merchant"`
}
MerchantService definition
type Notification ¶
type NotificationService ¶
type NotificationService struct {
Notification *Notification `json:"notification"`
}
NotificationService definition
type OrderService ¶
type OrderService struct {
Order *Order `json:"order"`
}
OrderService definition
type PaymentService ¶
type PaymentService struct {
Payment *Payment `json:"payment"`
}
PaymentService definition
type PriceMoney ¶
type PriceMoney struct { // The amount of money, in the smallest denomination of the currency // indicated by currency. For example, when currency is USD, // amount is in cents. Monetary amounts can be positive or negative. // See the specific field description to determine the meaning // of the sign in a particular case. Amount int64 `json:"amount"` // The type of currency, in ISO 4217 format. // For example, the currency code for US dollars is USD. Currency string `json:"currency"` }
Money fields can be signed or unsigned. Fields that do not explicitly define whether they are signed or unsigned are considered unsigned and can only hold positive amounts. For signed fields, the sign of the value indicates the purpose of the money transfer. See Working with Monetary Amounts for more information.
type PurchaseTotal ¶
type PurchaseTotal struct { SubTotal *PriceMoney `json:"sub_total"` Discount *PriceMoney `json:"discount"` TaxTotal *PriceMoney `json:"tax_total"` }
type RefundService ¶
type RefundService struct {
Refund *Refund `json:"refund"`
}
RefundService definition
type Request ¶
type Request struct { MerchantService *MerchantService `json:"merchant_service,omitempty" form:"-"` OrderService *OrderService `json:"order_service,omitempty" form:"-"` PaymentService *PaymentService `json:"payment_service,omitempty" form:"-"` RefundService *RefundService `json:"refund_service,omitempty" form:"-"` SecurityService *SecurityService `json:"security_service,omitempty" form:"-"` FetchService *FetchService `json:"-"` SubscriptionService *SubscriptionService `json:"subscription_service,omitempty" form:"-"` NotificationService *NotificationService `json:"notification_service,omitempty" form:"-"` }
type SecurityService ¶
type SecurityService struct {
Security *Security `json:"security"`
}
SecurityService definition
type Subscription ¶
type SubscriptionService ¶
type SubscriptionService struct {
Subscription *Subscription `json:"subscription"`
}
Source Files
¶
- cart.go
- fetch.go
- fetch_service.go
- helpers.go
- merchant.go
- merchant_service.go
- notification.go
- notification_service.go
- order.go
- order_service.go
- payment.go
- payment_service.go
- price_money.go
- purchase_totals.go
- refund.go
- refund_service.go
- request.go
- security.go
- security_service.go
- services.go
- subscription.go
- subscription_service.go
Click to show internal directories.
Click to hide internal directories.