Versions in this module Expand all Collapse all v1 v1.1.0 Feb 2, 2024 Changes in this version + const APIVersion + const SDKVersion + var RegionHostMap = map[string]string + var RegionMap = map[string]string + func Bool(v bool) *bool + func Int(v int) *int + func Int64(v int64) *int64 + func MustParseInt64(v string) int64 + func ParseInt64(v string) (int64, error) + func String(v string) *string + type AddressDetails struct + AddressLine1 string + AddressLine2 string + AddressLine3 string + City string + CountryCode string + County string + District string + Name string + PhoneNumber string + PostalCode string + StateOrRegion string + type Buyer struct + BuyerID string + Email string + Name string + PhoneNumber string + PostalCode string + ShippingAddress AddressDetails + type ChargePermissionResponse struct + BillingAddress *AddressDetails + Buyer *Buyer + ChargePermissionID string + ChargePermissionReferenceID string + CreationTimestamp string + ExpirationTimestamp string + Limits *Limits + MerchantMetadata *MerchantMetadata + PaymentPreferences []PaymentPreference + PlatformID string + PresentmentCurrency string + ReleaseEnvironment string + ShippingAddress *AddressDetails + StatusDetails *StatusDetails + type CheckoutSessionResponse struct + BillingAddress *AddressDetails + Buyer *Buyer + ChargeID string + ChargePermissionID string + ChargePermissionType string + CheckoutSessionID string + Constraints []Constraint + CreationTimestamp string + DeliverySpecifications *DeliverySpecifications + ExpirationTimestamp string + MerchantMetadata *MerchantMetadata + PaymentDetails *PaymentDetails + PaymentPreferences []PaymentPreference + PlatformID string + ProductType string + ProviderMetadata *ProviderMetadata + RecurringMetadata *RecurringMetadata + ReleaseEnvironment string + ShippingAddress *AddressDetails + StatusDetails *StatusDetails + StoreID string + WebCheckoutDetails *WebCheckoutDetails + type Client struct + HTTPClient *http.Client + PrivateKey []byte + PublicKeyID string + Region string + Sandbox bool + func New(publicKeyID string, privateKey []byte, region string, sandbox bool, ...) (*Client, error) + func (c *Client) CloseChargePermission(ctx context.Context, chargePermissionID string, ...) (*CloseChargePermissionResponse, *http.Response, error) + func (c *Client) CompleteCheckoutSession(ctx context.Context, checkoutSessionID string, ...) (*CompleteCheckoutSessionResponse, *http.Response, error) + func (c *Client) CreateCharge(ctx context.Context, req *CreateChargeRequest) (*CreateChargeResponse, *http.Response, error) + func (c *Client) CreateRefund(ctx context.Context, req *CreateRefundRequest) (*CreateRefundResponse, *http.Response, error) + func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error) + func (c *Client) GenerateButtonSignature(payload string) (string, error) + func (c *Client) GetChargePermission(ctx context.Context, chargePermissionID string) (*GetChargePermissionResponse, *http.Response, error) + func (c *Client) GetCheckoutSession(ctx context.Context, checkoutSessionID string) (*GetCheckoutSessionResponse, *http.Response, error) + func (c *Client) GetRefund(ctx context.Context, refundID string) (*GetRefundResponse, *http.Response, error) + func (c *Client) NewRequest(method, path string, body interface{}) (*http.Request, error) + func (c *Client) UpdateCheckoutSession(ctx context.Context, checkoutSessionID string, ...) (*UpdateCheckoutSessionResponse, *http.Response, error) + type CloseChargePermissionRequest struct + CancelPendingCharges *bool + ClosureReason string + type CloseChargePermissionResponse ChargePermissionResponse + type CompleteCheckoutSessionRequest struct + ChargeAmount *Price + type CompleteCheckoutSessionResponse CheckoutSessionResponse + type Constraint struct + ConstraintID string + Description string + type CreateChargeRequest struct + CanHandlePendingAuthorization *bool + CaptureNow *bool + ChargeAmount *Price + ChargePermissionID string + MerchantMetadata *MerchantMetadata + ProviderMetadata *ProviderMetadata + SoftDescriptor string + type CreateChargeResponse struct + CaptureAmount *Price + ChargeAmount *Price + ChargeID string + ChargePermissionID string + ConversionRate string + ConvertedAmount string + CreationTimestamp string + ExpirationTimestamp string + MerchantMetadata *MerchantMetadata + ProviderMetadata *ProviderMetadata + RefundedAmount *Price + ReleaseEnvironment string + SoftDescriptor string + StatusDetails *StatusDetails + type CreateCheckoutSessionRequest struct + AddressDetails *AddressDetails + ChargePermissionType string + DeliverySpecifications *DeliverySpecifications + MerchantMetadata *MerchantMetadata + PaymentDetails *PaymentDetails + PlatformID string + ProviderMetadata *ProviderMetadata + RecurringMetadata *RecurringMetadata + StoreID string + WebCheckoutDetails *WebCheckoutDetails + func (c *CreateCheckoutSessionRequest) ToPayload() (string, error) + type CreateRefundRequest struct + ChargeID string + RefundAmount *Price + SoftDescriptor string + type CreateRefundResponse RefundResponse + type DeliverySpecifications struct + AddressRestrictions struct{ ... } + SpecialRestrictions []string + type ErrorResponse struct + Message string + ReasonCode string + type Frequency struct + Unit string + Value string + type GetChargePermissionResponse ChargePermissionResponse + type GetCheckoutSessionResponse CheckoutSessionResponse + type GetRefundResponse RefundResponse + type Limits struct + AmountBalance *Price + AmountLimit *Price + type MerchantMetadata struct + CustomInformation string + MerchantReferenceID string + MerchantStoreName string + NoteToBuyer string + type PaymentDetails struct + AllowOvercharge *bool + CanHandlePendingAuthorization *bool + ChargeAmount *Price + ExtendExpiration *bool + PaymentIntent string + PresentmentCurrency string + SoftDescriptor string + TotalOrderAmount *Price + type PaymentPreference struct + PaymentDescriptor string + type Price struct + Amount string + CurrencyCode string + type ProviderMetadata struct + ProviderReferenceID string + type Reason struct + ReasonCode string + ReasonDescription string + type RecurringMetadata struct + Amount *Price + Frequency *Frequency + type RefundResponse struct + ChargeID string + CreationTimestamp string + RefundAmount *Price + RefundID string + ReleaseEnvironment string + SoftDescriptor string + StatusDetails *StatusDetails + type StatusDetails struct + LastUpdatedTimestamp string + ReasonCode string + ReasonDescription string + Reasons []Reason + State string + type UpdateCheckoutSessionRequest struct + MerchantMetadata *MerchantMetadata + PaymentDetails *PaymentDetails + WebCheckoutDetails *WebCheckoutDetails + type UpdateCheckoutSessionResponse CheckoutSessionResponse + type WebCheckoutDetails struct + AmazonPayRedirectURL string + CheckoutResultReturnURL string + CheckoutReviewReturnURL string