{"id":44971247,"url":"https://github.com/martinusso/getnet","last_synced_at":"2026-02-18T15:33:12.898Z","repository":{"id":57534283,"uuid":"281485340","full_name":"martinusso/getnet","owner":"martinusso","description":"SDK golang para integração com a API Getnet","archived":false,"fork":false,"pushed_at":"2020-08-05T15:43:27.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T01:50:53.332Z","etag":null,"topics":["cartao-de-credito","creditcard","getnet","golang"],"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/martinusso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-21T19:24:48.000Z","updated_at":"2020-08-05T15:43:07.000Z","dependencies_parsed_at":"2022-09-26T18:21:31.401Z","dependency_job_id":null,"html_url":"https://github.com/martinusso/getnet","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/martinusso/getnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinusso%2Fgetnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinusso%2Fgetnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinusso%2Fgetnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinusso%2Fgetnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinusso","download_url":"https://codeload.github.com/martinusso/getnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinusso%2Fgetnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29583918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T13:56:48.962Z","status":"ssl_error","status_checked_at":"2026-02-18T13:54:34.145Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cartao-de-credito","creditcard","getnet","golang"],"created_at":"2026-02-18T15:33:12.840Z","updated_at":"2026-02-18T15:33:12.889Z","avatar_url":"https://github.com/martinusso.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# getnet\n\n[![Build Status](https://travis-ci.org/martinusso/getnet.svg?branch=master)](https://travis-ci.org/martinusso/getnet)\n[![Coverage Status](https://coveralls.io/repos/github/martinusso/getnet/badge.svg?branch=master)](https://coveralls.io/github/martinusso/getnet?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/martinusso/getnet)](https://goreportcard.com/report/github.com/martinusso/getnet)\n\nSDK golang para integração com a API Getnet.\n\nConsulte a documentação oficial da API Getnet https://developers.getnet.com.br/api para maiores detalhes sobre os campos. \n\n## Funcionalidades\n\n- Autenticação\n  - Geração do token de acesso\n\n- Tokenização\n  - Geração do token do cartão\n\n- Pagamento\n  - Verificação de cartão\n  - Pagamento com cartão de crédito\n\n## Usando\n\n```\ngo get \"github.com/martinusso/getnet\"\n```\n\n### Autenticação - Geração do token de acesso\n\n\n```\nvar err error\n\ncredentials := getnet.ClientCredentials{\n\tID:     \"ecb847f2-e423-40c0-808c-55d2098a92ab\",\n\tSecret: \"1386f27e-0f2e-45f7-9efd-c8fdc1657426\"}\ncredentials.AccessToken, err = credentials.NewAccessToken()\nif err != nil {\n\tlog.Fatal(err)\n}\n```\n\n\n### Tokenização - Geração do token do cartão\n\n```\nvar err error\n\ncard := getnet.Card{\n\tCardNumber:      \"5155901222280001\",\n\tCardHolderName:  \"JOAO DA SILVA\",\n\tSecurityCode:    \"123\",\n\tBrand:           \"Mastercard\",\n\tExpirationMonth: \"12\",\n\tExpirationYear:  \"20\",\n}\ncard.NumberToken, err = card.Token(credentials)\nif err != nil {\n\tlog.Fatal(err)\n}\n```\n\n### Cartão de Crédito\n\n#### Pagamento com cartão de crédito\n\n```\npayment := getnet.Payment{\n\tAmount:   1.00,\n\tCurrency: \"BRL\",\n\tOrder: getnet.Order{\n\t\tOrderID:     \"ea3dae62-1125-4eb4-b3ef-dcb720e8899d\",\n\t\tSalesTax:    0,\n\t\tProductType: Service,\n\t},\n\tCustomer: getnet.Customer{\n\t\tCustomerID:     \"customer_id\",\n\t\tFirstName:      \"João\",\n\t\tLastName:       \"da Silva\",\n\t\tEmail:          \"customer@email.com.br\",\n\t\tDocumentType:   \"CPF\",\n\t\tDocumentNumber: \"12345678912\",\n\t\tPhoneNumber:    \"27987654321\",\n\t\tBillingAddress: getnet.BillingAddress{\n\t\t\tStreet:     \"Av. Brasil\",\n\t\t\tNumber:     \"1000\",\n\t\t\tComplement: \"Sala 1\",\n\t\t\tDistrict:   \"São Geraldo\",\n\t\t\tCity:       \"Porto Alegre\",\n\t\t\tState:      \"RS\",\n\t\t\tCountry:    \"Brasil\",\n\t\t\tPostalCode: \"90230060\",\n\t\t},\n\t},\n\tCredit: getnet.Credit{\n\t\tDelayed:            false,\n\t\tAuthenticated:      false,\n\t\tPreAuthorization:   false,\n\t\tSaveCardData:       false,\n\t\tTransactionType:    Full,\n\t\tNumberInstallments: 1,\n\t\tSoftDescriptor:     \"Texto exibido na fatura do cartão do comprador\",\n\t\tDynamicMCC:         1799,\n\t\tCard: card, // Tokenização - Geração do token do cartão\n\t},\n}\n\n// credentials obtido em Autenticação - Geração do token de acesso\nresponse, error := payment.Pay(credentials)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinusso%2Fgetnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinusso%2Fgetnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinusso%2Fgetnet/lists"}