{"id":13412863,"url":"https://github.com/BoltApp/sleet","last_synced_at":"2025-03-14T18:32:35.660Z","repository":{"id":37502772,"uuid":"221559204","full_name":"BoltApp/sleet","owner":"BoltApp","description":"Payment abstraction library - one interface for multiple payment processors ( inspired by Ruby's ActiveMerchant )","archived":true,"fork":false,"pushed_at":"2024-02-29T00:14:27.000Z","size":586,"stargazers_count":140,"open_issues_count":9,"forks_count":20,"subscribers_count":51,"default_branch":"master","last_synced_at":"2024-07-30T20:43:01.991Z","etag":null,"topics":["adyen","authorizenet","bolt","braintree","cybersource","payment","payment-processing","stripe"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BoltApp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-11-13T21:56:58.000Z","updated_at":"2024-07-26T18:33:20.000Z","dependencies_parsed_at":"2024-01-08T15:03:33.982Z","dependency_job_id":"2965023a-5620-4217-8521-f0dae8f500ef","html_url":"https://github.com/BoltApp/sleet","commit_stats":null,"previous_names":[],"tags_count":229,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoltApp%2Fsleet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoltApp%2Fsleet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoltApp%2Fsleet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoltApp%2Fsleet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BoltApp","download_url":"https://codeload.github.com/BoltApp/sleet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221495313,"owners_count":16832458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adyen","authorizenet","bolt","braintree","cybersource","payment","payment-processing","stripe"],"created_at":"2024-07-30T20:01:30.294Z","updated_at":"2024-10-26T04:31:21.993Z","avatar_url":"https://github.com/BoltApp.png","language":"Go","readme":"# Sleet\n\n[![CircleCI status](https://circleci.com/gh/BoltApp/sleet.png?circle-token=d60ceb64eb6ebdfd6a45a4703563c1752598db63 \"CircleCI status\")](https://circleci.com/gh/BoltApp/sleet)\n[![GoDoc](https://godoc.org/github.com/BoltApp/sleet?status.svg)](https://pkg.go.dev/github.com/BoltApp/sleet?tab=doc)\n[![Go Report Card](https://goreportcard.com/badge/github.com/BoltApp/sleet)](https://goreportcard.com/report/github.com/BoltApp/sleet)\n\nPayment abstraction library - interact with different Payment Service Providers (PsP) with one unified interface.\n\n## Installation\n\n`go get github.com/BoltApp/sleet`\n\n## Methodology\n\nWherever possible, we try to use native Golang implementations of the PsP's API. We also assume that the caller can pass along raw credit card information (i.e. are PCI compliant)\n\n### Supported Gateway API Calls\n\n1. Authorize\n2. Capture\n3. Void\n4. Refund\n\n### Webhooks Support\n\nWe support abstracting PsP Webhook notifications into a common interface. \n\n### PsP Support Matrix\n| PsP | Gateway APIs | Webhooks |\n|-----|--------------|----------|\n| [Adyen](https://docs.adyen.com/classic-integration/api-integration-ecommerce) | ✅ | ❌ |\n| [Authorize.Net](https://developer.authorize.net/api/reference/index.html#payment-transactions) | ✅ | ❌ |\n| [Braintree](https://www.braintreepayments.com/) | ✅ | ❌ |\n| [CyberSource](https://developer.cybersource.com/api-reference-assets/index.html#payments) | ✅ | ❌ |\n| [Checkout.com](https://api-reference.checkout.com/) | ✅ | ❌ |\n| [FirstData](https://docs.firstdata.com/org/gateway/docs/api) | ✅ | ❌ |\n| [NMI](https://secure.networkmerchants.com/gw/merchants/resources/integration/integration_portal.php#methodology) | ✅ | ❌ |\n| [Orbital](https://developer.jpmorgan.com/products/orbital-api) | ✅ | ❌ |\n| [RocketGate](https://www.rocketgate.com/) | ✅ | ❌ |\n| [Stripe](https://stripe.com/docs/api) | ✅ | ❌ |\n\n## To run tests\n\n###  Unit test\n\n```\ngo test -v -tags=unit $(go list ./... | grep -v integration-tests)\n```\n\n### Integration test\nThe following environment variables are needed in order to run tests\n\n```shell script\n$ export ADYEN_USERNAME=\"YOUR_ADYEN_WEBSERVICE_USERNAME\"\n$ export ADYEN_ACCOUNT=\"YOUR_ADYEN_MERCHANT_ACCOUNT\"\n$ export ADYEN_PASSWORD=\"YOUR_ADYEN_WEBSERVICE_PASSWORD\"\n$ export STRIPE_TEST_KEY=\"YOUR_STRIPE_API_KEY\"\n$ export AUTH_NET_LOGIN_ID=\"YOUR_AUTHNET_LOGIN\"\n$ export AUTH_NET_TXN_KEY=\"YOUR_AUTHNET_TXN_KEY\"\n$ export BRAINTREE_MERCHANT_ID=\"YOUR_BRAINTREE_MERCHANT_ACCOUNT\"\n$ export BRAINTREE_PUBLIC_KEY=\"YOUR_BRAINTREE_PUBLIC_KEY\"\n$ export BRAINTREE_PRIVATE_ID=\"YOUR_BRAINTREE_PRIVATE_KEY\"\n$ export CYBERSOURCE_ACCOUNT=\"YOUR_CYBS_ACCOUNT\"\n$ export CYBERSOURCE_API_KEY=\"YOUR_CYBS_KEY\"\n$ export CYBERSOURCE_SHARED_SECRET=\"YOUR_CYBS_SECRET\"\n$ export NMI_SECURITY_KEY=\"YOUR_NMI_PRIVATE_KEY\"\n$ export CHECKOUTCOM_TEST_KEY=\"YOUR_CHECKOUTCOM_PRIVATE_KEY\"\n$ export CHECKOUTCOM_TEST_KEY_WITH_PCID=\"YOUR_CHECKOUTCOM_PRIVATE_KEY_WITH_PROCESSING_CHANNEL_ID\"\n$ export CHECKOUTCOM_TEST_PCID=\"YOUR_CHECKOUTCOM_PROCESSING_CHANNEL_ID\"\n```\n\nThen run tests with: `go test ./integration-tests/`\n\n## Code Example for Auth + Capture\n\n```go\nimport (\n  \"github.com/BoltApp/sleet\"\n  \"github.com/BoltApp/sleet/gateways/authorize_net\"\n)\n// Generate a client using your own credentials\nclient := authorize_net.NewClient(\"AUTH_NET_LOGIN_ID\", \"AUTH_NET_TXN_KEY\")\n\namount := sleet.Amount{\n  Amount: 100,\n  Currency: \"USD\",\n}\ncard := sleet.CreditCard{\n  FirstName: \"Bolt\",\n  LastName: \"Checkout\",\n  Number: \"4111111111111111\",\n  ExpMonth: 8,\n  EpxYear: 2010,\n  CVV: \"000\",\n}\nstreetAddress := \"22 Linda St.\"\nlocality := \"Hoboken\"\nregionCode := \"NJ\"\npostalCode := \"07030\"\ncountryCode := \"US\"\naddress := sleet.BillingAddress{\n  StreetAddress1: \u0026streetAddress,\n  Locality:       \u0026locality,\n  RegionCode:     \u0026regionCode,\n  PostalCode:     \u0026postalCode,\n  CountryCode:    \u0026countryCode,\n}\n// To get specific response headers, add them to the request options.\n// They will be attached to the AuthorizationResponse\noptions := make(map[string]interface{})\noptions[\"ResponseHeader\"] = []string{\"x-test-header\"}\nauthorizeRequest := sleet.AuthorizationRequest{\n  Amount: \u0026amount,\n  CreditCard: \u0026card,\n  BillingAddress: \u0026address,\n  Options: options,\n}\nauthorizeResponse, _ := client.Authorize(\u0026authorizeRequest)\n\ncaptureRequest := sleet.CaptureRequest{\n  Amount:               \u0026amount,\n  TransactionReference: authorizeResponse.TransactionReference,\n}\nclient.Capture(\u0026captureRequest)\n```\n","funding_links":[],"categories":["Financial","金融","Go","Relational Databases"],"sub_categories":["Search and Analytic Databases","检索及分析资料库","Advanced Console UIs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBoltApp%2Fsleet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBoltApp%2Fsleet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBoltApp%2Fsleet/lists"}