{"id":15035317,"url":"https://github.com/hunterlong/authorizecim","last_synced_at":"2026-03-02T08:01:52.122Z","repository":{"id":57499255,"uuid":"59906252","full_name":"hunterlong/AuthorizeCIM","owner":"hunterlong","description":"Authorize.net CIM, AIM, and ARB Functions for Go Language","archived":false,"fork":false,"pushed_at":"2024-08-06T05:07:48.000Z","size":147,"stargazers_count":37,"open_issues_count":10,"forks_count":23,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-20T04:48:04.021Z","etag":null,"topics":["authorizenet","credit-card","golang","subscription","transaction"],"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/hunterlong.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-28T17:19:16.000Z","updated_at":"2025-01-30T14:00:28.000Z","dependencies_parsed_at":"2024-10-12T15:20:31.371Z","dependency_job_id":null,"html_url":"https://github.com/hunterlong/AuthorizeCIM","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hunterlong/AuthorizeCIM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunterlong%2FAuthorizeCIM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunterlong%2FAuthorizeCIM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunterlong%2FAuthorizeCIM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunterlong%2FAuthorizeCIM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hunterlong","download_url":"https://codeload.github.com/hunterlong/AuthorizeCIM/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunterlong%2FAuthorizeCIM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29995910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["authorizenet","credit-card","golang","subscription","transaction"],"created_at":"2024-09-24T20:28:09.759Z","updated_at":"2026-03-02T08:01:52.068Z","avatar_url":"https://github.com/hunterlong.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![alt tag](http://pichoster.net/images/2016/05/30/authcimyjIpi.jpg)\n\n# Authorize.net CIM, AIM, and ARB for Go Language\n[![Build Status](https://travis-ci.org/hunterlong/AuthorizeCIM.svg?branch=master)](https://travis-ci.org/hunterlong/AuthorizeCIM)  [![Code Climate](https://lima.codeclimate.com/github/Hunterlong/AuthorizeCIM/badges/gpa.svg)](https://lima.codeclimate.com/github/Hunterlong/AuthorizeCIM) [![Coverage Status](https://coveralls.io/repos/github/hunterlong/AuthorizeCIM/badge.svg?branch=master)](https://coveralls.io/github/hunterlong/AuthorizeCIM?branch=master) [![GoDoc](https://godoc.org/github.com/hunterlong/AuthorizeCIM?status.svg)](https://godoc.org/github.com/hunterlong/AuthorizeCIM) [![Go Report Card](https://goreportcard.com/badge/github.com/hunterlong/AuthorizeCIM)](https://goreportcard.com/report/github.com/hunterlong/AuthorizeCIM)\n\nGive your Go Language applications the ability to store and retrieve credit cards from Authorize.net CIM, AIM, and ARB API.\nThis golang package lets you create recurring subscriptions, AUTH only transactions, voids, refunds, and other functionality connected to the Authorize.net API.\n\n***\n\n# Features\n* [AIM Payment Transactions](https://github.com/hunterlong/AuthorizeCIM#payment-transactions)\n* [CIM Customer Information Manager](https://github.com/hunterlong/AuthorizeCIM#customer-profile)\n* [ARB Automatic Recurring Billing](https://github.com/hunterlong/AuthorizeCIM#recurring-billing) (Subscriptions)\n* [Transaction Reporting](https://github.com/hunterlong/AuthorizeCIM#transaction-reporting)\n* [Fraud Management](https://github.com/hunterlong/AuthorizeCIM#fraud-management)\n* Creating Users Accounts based on user's unique ID and/or email address\n* Store Payment Profiles (credit card) on Authorize.net using Customer Information Manager (CIM)\n* Create Subscriptions (monthly, weekly, days) with Automated Recurring Billing (ARB)\n* Process transactions using customers stored credit card\n* Delete and Updating payment profiles\n* Add Shipping Profiles into user accounts\n* Delete a customers entire account\n* Tests included and examples below\n\n```go\ncustomer := AuthorizeCIM.Customer{\n        ID: \"13838\",\n    }\n\ncustomerInfo := customer.Info()\n\npaymentProfiles := customerInfo.PaymentProfiles()\nshippingProfiles := customerInfo.ShippingProfiles()\nsubscriptions := customerInfo.Subscriptions()\n```\n***\n\n# Usage\n* Import package\n```\ngo get gopkg.in/hunterlong/authorizecim.v1\n```\n```go\nimport \"gopkg.in/hunterlong/authorizecim.v1\"\n```\n###### Or Shorten the Package Name\n```go\nimport auth \"gopkg.in/hunterlong/authorizecim.v1\"\n// auth.SetAPIInfo(apiName,apiKey,\"test\")\n```\n***\n\n## Set Authorize.net API Keys\nYou can get Sandbox Access at:  https://developer.authorize.net/hello_world/sandbox/\n```go\napiName := \"auth_name_here\"\napiKey := \"auth_transaction_key_here\"\nAuthorizeCIM.SetAPIInfo(apiName,apiKey,\"test\")\n// use \"live\" to do transactions on production server\n```\n***\n\n## Included API References\n\n:white_check_mark: Set API Creds\n```go\nfunc main() {\n\n    apiName := \"PQO38FSL\"\n    apiKey := \"OQ8NFBAPA9DS\"\n    apiMode := \"test\"\n\n    AuthorizeCIM.SetAPIInfo(apiName,apiKey,apiMode)\n\n}\n```\n***\n\n# Payment Transactions\n\n:white_check_mark: chargeCard\n```go\nnewTransaction := AuthorizeCIM.NewTransaction{\n\t\tAmount: \"15.90\",\n\t\tCreditCard: CreditCard{\n\t\t\tCardNumber:     \"4007000000027\",\n\t\t\tExpirationDate: \"10/23\",\n\t\t},\n\t}\nresponse, err := newTransaction.Charge()\nif response.Approved() {\n\n}\n```\n***\n\n:white_check_mark: authorizeCard\n```go\nnewTransaction := AuthorizeCIM.NewTransaction{\n\t\tAmount: \"100.00\",\n\t\tCreditCard: CreditCard{\n\t\t\tCardNumber:     \"4012888818888\",\n\t\t\tExpirationDate: \"10/27\",\n\t\t},\n\t}\nresponse, err := newTransaction.AuthOnly()\nif response.Approved() {\n\n}\n```\n***\n\n:white_check_mark: capturePreviousCard\n```go\noldTransaction := AuthorizeCIM.PreviousTransaction{\n\t\tAmount: \"49.99\",\n\t\tRefId:  \"AUTHCODEHERE001\",\n\t}\nresponse, err := oldTransaction.Capture()\nif response.Approved() {\n\n}\n```\n***\n\n:white_check_mark: captureAuthorizedCardChannel\n```go\nnewTransaction := AuthorizeCIM.NewTransaction{\n\t\tAmount: \"38.00\",\n\t\tCreditCard: CreditCard{\n\t\t\tCardNumber:     \"4012888818888\",\n\t\t\tExpirationDate: \"10/24\",\n\t\t},\n\t\tAuthCode: \"YOURAUTHCODE\",\n\t}\nresponse, err := newTransaction.Charge()\nif response.Approved() {\n\n}\n```\n***\n\n:white_check_mark: refundTransaction\n```go\nnewTransaction := AuthorizeCIM.NewTransaction{\n\t\tAmount: \"15.00\",\n\t\tCreditCard: CreditCard{\n\t\t\tCardNumber:     \"4012888818888\",\n\t\t\tExpirationDate: \"10/24\",\n\t\t},\n\t\tRefTransId: \"0392482938402\",\n\t}\nresponse, err := newTransaction.Refund()\nif response.Approved() {\n\n}\n```\n***\n\n:white_check_mark: voidTransaction\n```go\noldTransaction := AuthorizeCIM.PreviousTransaction{\n\t\tRefId: \"3987324293834\",\n\t}\nresponse, err := oldTransaction.Void()\nif response.Approved() {\n\n}\n```\n***\n\n:white_medium_square: updateSplitTenderGround\n\n:white_medium_square: debitBankAccount\n\n:white_medium_square: creditBankAccount\n\n:white_check_mark: chargeCustomerProfile\n```go\ncustomer := AuthorizeCIM.Customer{\n\t\tID: \"49587345\",\n\t\tPaymentID: \"84392124324\",\n\t}\n\nnewTransaction := AuthorizeCIM.NewTransaction{\n\t\tAmount: \"35.00\",\n\t}\n\nresponse, err := newTransaction.ChargeProfile(customer)\n\nif response.Ok() {\n\n}\n```\n***\n\n:white_medium_square: chargeTokenCard\n\n:white_medium_square: creditAcceptPaymentTransaction\n\n:white_medium_square: getAccessPaymentPage\n\n:white_medium_square: getHostedPaymentPageRequest\n\n## Transaction Responses\n```go\nresponse.Ok()                   // bool\nresponse.Approved()             // bool\nresponse.Message()              // string\nresponse.ErrorMessage()         // string\nresponse.TransactionID()        // string\nresponse.AVS()                  // [avsResultCode,cavvResultCode,cvvResultCode]\n```\n***\n\n# Fraud Management\n\n:white_check_mark: getUnsettledTransactionListRequest\n```go\ntransactions := AuthorizeCIM.UnsettledBatchList()\nfmt.Println(\"Unsettled Count: \", transactions.Count)\n```\n***\n\n:white_check_mark: updateHeldTransactionRequest\n```go\noldTransaction := AuthorizeCIM.PreviousTransaction{\n\t\tAmount: \"49.99\",\n\t\tRefId:  \"39824723983\",\n\t}\n\n\tresponse, err := oldTransaction.Approve()\n\t//response := oldTransaction.Decline()\n\n\tif response.Ok() {\n\n\t}\n```\n***\n\n# Recurring Billing\n\n:white_check_mark: ARBCreateSubscriptionRequest\n```go\nsubscription := AuthorizeCIM.Subscription{\n\t\tName:        \"New Subscription\",\n\t\tAmount:      \"9.00\",\n\t\tTrialAmount: \"0.00\",\n\t\tPaymentSchedule: \u0026PaymentSchedule{\n\t\t\tStartDate:        CurrentDate(),\n\t\t\tTotalOccurrences: \"9999\",\n\t\t\tTrialOccurrences: \"0\",\n\t\t\tInterval: AuthorizeCIM.IntervalMonthly(),\n\t\t},\n\t\tPayment: \u0026Payment{\n\t\t\tCreditCard: CreditCard{\n\t\t\t\tCardNumber:     \"4007000000027\",\n\t\t\t\tExpirationDate: \"10/23\",\n\t\t\t},\n\t\t},\n\t\tBillTo: \u0026BillTo{\n\t\t\tFirstName: \"Test\",\n\t\t\tLastName:  \"User\",\n\t\t},\n\t}\n\nresponse, err := subscription.Charge()\n\nif response.Approved() {\n    fmt.Println(\"New Subscription ID: \",response.SubscriptionID)\n}\n```\n###### For Intervals, you can use simple methods\n```go\nAuthorizeCIM.IntervalWeekly()      // runs every week (7 days)\nAuthorizeCIM.IntervalMonthly()     // runs every Month\nAuthorizeCIM.IntervalQuarterly()   // runs every 3 months\nAuthorizeCIM.IntervalYearly()      // runs every 1 year\nAuthorizeCIM.IntervalDays(\"15\")    // runs every 15 days\nAuthorizeCIM.IntervalMonths(\"6\")   // runs every 6 months\n```\n***\n\n:white_check_mark: ARBCreateSubscriptionRequest from Customer Profile\n```go\nsubscription := AuthorizeCIM.Subscription{\n\t\tName:        \"New Customer Subscription\",\n\t\tAmount:      \"12.00\",\n\t\tTrialAmount: \"0.00\",\n\t\tPaymentSchedule: \u0026PaymentSchedule{\n\t\t\tStartDate:        CurrentDate(),\n\t\t\tTotalOccurrences: \"9999\",\n\t\t\tTrialOccurrences: \"0\",\n\t\t\tInterval: AuthorizeCIM.IntervalDays(\"15\"),\n\t\t},\n\t\tProfile: \u0026CustomerProfiler{\n\t\t\tCustomerProfileID: \"823928379\",\n\t\t\tCustomerPaymentProfileID: \"183949200\",\n\t\t\t//CustomerShippingProfileID: \"310282443\",\n\t\t},\n\t}\n\n\tresponse, err := subscription.Charge()\n\n\tif response.Approved() {\n\t\tnewSubscriptionId = response.SubscriptionID\n\t\tfmt.Println(\"Customer #\",response.CustomerProfileId(), \" Created a New Subscription: \", response.SubscriptionID)\n\t}\n```\n***\n\n:white_check_mark: ARBGetSubscriptionRequest\n```go\nsub := AuthorizeCIM.SetSubscription{\n\t\tId: \"2973984693\",\n\t}\n\nsubscriptionInfo := sub.Info()\n```\n***\n\n:white_check_mark: ARBGetSubscriptionStatusRequest\n```go\nsub := AuthorizeCIM.SetSubscription{\n\t\tId: \"2973984693\",\n\t}\n\nsubscriptionInfo, err := sub.Status()\n\nfmt.Println(\"Subscription ID has status: \",subscriptionInfo.Status)\n```\n***\n\n:white_check_mark: ARBUpdateSubscriptionRequest\n```go\nsubscription := AuthorizeCIM.Subscription{\n\t\tPayment: Payment{\n\t\t\tCreditCard: CreditCard{\n\t\t\t\tCardNumber:     \"5424000000000015\",\n\t\t\t\tExpirationDate: \"06/25\",\n\t\t\t},\n\t\t},\n\t\tSubscriptionId: newSubscriptionId,\n\t}\n\nresponse, err := subscription.Update()\n\nif response.Ok() {\n\n}\n```\n***\n\n:white_check_mark: ARBCancelSubscriptionRequest\n```go\nsub := AuthorizeCIM.SetSubscription{\n\t\tId: \"2973984693\",\n\t}\n\nsubscriptionInfo, err := sub.Cancel()\n\nfmt.Println(\"Subscription ID has been canceled: \", sub.Id, \"\\n\")\n```\n***\n\n:white_check_mark: ARBGetSubscriptionListRequest\n```go\ninactive := AuthorizeCIM.SubscriptionList(\"subscriptionInactive\")\nfmt.Println(\"Amount of Inactive Subscriptions: \", inactive.Count())\n\nactive := AuthorizeCIM.SubscriptionList(\"subscriptionActive\")\nfmt.Println(\"Amount of Active Subscriptions: \", active.Count())\n```\n***\n\n# Customer Profile (CIM)\n\n:white_check_mark: createCustomerProfileRequest\n```go\ncustomer := AuthorizeCIM.Profile{\n\t\tMerchantCustomerID: \"86437\",\n\t\tEmail:              \"info@emailhereooooo.com\",\n\t\tPaymentProfiles: \u0026PaymentProfiles{\n\t\t\tCustomerType: \"individual\",\n\t\t\tPayment: Payment{\n\t\t\t\tCreditCard: CreditCard{\n\t\t\t\t\tCardNumber:     \"4007000000027\",\n\t\t\t\t\tExpirationDate: \"10/23\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\n\tresponse, err := customer.Create()\n\nif response.Ok() {\n    fmt.Println(\"New Customer Profile Created #\",response.CustomerProfileID)\n    fmt.Println(\"New Customer Payment Profile Created #\",response.CustomerPaymentProfileID)\n} else {\n       fmt.Println(response.ErrorMessage())\n   }\n```\n***\n\n:white_check_mark: getCustomerProfileRequest\n```go\ncustomer := AuthorizeCIM.Customer{\n\t\tID: \"13838\",\n\t}\n\ncustomerInfo, err := customer.Info()\n\npaymentProfiles := customerInfo.PaymentProfiles()\nshippingProfiles := customerInfo.ShippingProfiles()\nsubscriptions := customerInfo.Subscriptions()\n```\n***\n\n:white_check_mark: getCustomerProfileIdsRequest\n```go\nprofiles, _ := AuthorizeCIM.GetProfileIds()\nfmt.Println(profiles)\n```\n***\n\n:white_check_mark: updateCustomerProfileRequest\n```go\ncustomer := AuthorizeCIM.Profile{\n\t\tMerchantCustomerID: \"13838\",\n\t\tCustomerProfileId: \"13838\",\n\t\tDescription: \"Updated Account\",\n\t\tEmail:       \"info@updatedemail.com\",\n\t}\n\n\tresponse := customer.Update()\n\nif response.Ok() {\n\n}\n```\n***\n\n:white_check_mark: deleteCustomerProfileRequest\n```go\ncustomer := AuthorizeCIM.Customer{\n\t\tID: \"13838\",\n\t}\n\n\tresponse, err := customer.Delete()\n\nif response.Ok() {\n\n}\n```\n***\n\n# Customer Payment Profile\n\n:white_check_mark: createCustomerPaymentProfileRequest\n```go\npaymentProfile := AuthorizeCIM.CustomerPaymentProfile{\n\t\tCustomerProfileID: \"32948234232\",\n\t\tPaymentProfile: PaymentProfile{\n\t\t\tBillTo: BillTo{\n\t\t\t\tFirstName: \"okokk\",\n\t\t\t\tLastName: \"okok\",\n\t\t\t\tAddress: \"1111 white ct\",\n\t\t\t\tCity: \"los angeles\",\n\t\t\t\tCountry: \"USA\",\n\t\t\t\tPhoneNumber: \"8885555555\",\n\t\t\t},\n\t\t\tPayment: Payment{\n\t\t\t\tCreditCard: CreditCard{\n\t\t\t\t\tCardNumber: \"5424000000000015\",\n\t\t\t\t\tExpirationDate: \"04/22\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDefaultPaymentProfile: \"true\",\n\t\t},\n\t}\n\nresponse, err := paymentProfile.Add()\n\nif response.Ok() {\n\n} else {\n    fmt.Println(response.ErrorMessage())\n}\n```\n***\n\n:white_check_mark: getCustomerPaymentProfileRequest\n```go\ncustomer := AuthorizeCIM.Customer{\n\t\tID: \"3923482487\",\n\t}\n\nresponse, err := customer.Info()\n\npaymentProfiles := response.PaymentProfiles()\n```\n\n:white_check_mark: getCustomerPaymentProfileListRequest\n```go\nprofileIds := AuthorizeCIM.GetPaymentProfileIds(\"2017-03\",\"cardsExpiringInMonth\")\n```\n***\n\n:white_check_mark: validateCustomerPaymentProfileRequest\n```go\ncustomerProfile := AuthorizeCIM.Customer{\n\t\tID: \"127723778\",\n\t\tPaymentID: \"984583934\",\n\t}\n\nresponse, err := customerProfile.Validate()\n\nif response.Ok() {\n\n}\n```\n***\n\n:white_check_mark: updateCustomerPaymentProfileRequest\n```go\ncustomer := AuthorizeCIM.Profile{\n\t\tCustomerProfileId:  \"3838238293\",\n\t\tPaymentProfileId: \"83929382739\",\n\t\tEmail:              \"info@updatedemail.com\",\n\t\tPaymentProfiles: \u0026PaymentProfiles{\n\t\t\tPayment: Payment{\n\t\t\t\tCreditCard: CreditCard{\n\t\t\t\t\tCardNumber: \"4007000000027\",\n\t\t\t\t\tExpirationDate: \"01/26\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tBillTo: \u0026BillTo{\n\t\t\t\tFirstName:   \"newname\",\n\t\t\t\tLastName:    \"golang\",\n\t\t\t\tAddress:     \"2841 purple ct\",\n\t\t\t\tCity:        \"los angeles\",\n\t\t\t\tState:\t\t  \"CA\",\n\t\t\t\tZip:            \"93939\",\n\t\t\t\tCountry:     \"USA\",\n\t\t\t\tPhoneNumber: \"8885555555\",\n\t\t\t},\n\t\t},\n\t}\n\nresponse, err := customer.UpdatePaymentProfile()\n\nif response.Ok() {\n    fmt.Println(\"Customer Payment Profile was Updated\")\n} else {\n    fmt.Println(response.ErrorMessage())\n}\n```\n***\n\n:white_check_mark: deleteCustomerPaymentProfileRequest\n```go\ncustomer := AuthorizeCIM.Customer{\n\t\tID: \"3724823472\",\n\t\tPaymentID: \"98238472349\",\n\t}\n\nresponse, err := customer.DeletePaymentProfile()\n\nif response.Ok() {\n    fmt.Println(\"Payment Profile was Deleted\")\n} else {\n    fmt.Println(response.ErrorMessage())\n}\n```\n***\n\n# Customer Shipping Profile\n\n:white_check_mark: createCustomerShippingAddressRequest\n```go\ncustomer := AuthorizeCIM.Profile{\n\t\tMerchantCustomerID: \"86437\",\n\t\tCustomerProfileId:  \"7832642387\",\n\t\tEmail:              \"info@emailhereooooo.com\",\n\t\tShipping: \u0026Address{\n\t\t\tFirstName:   \"My\",\n\t\t\tLastName:    \"Name\",\n\t\t\tCompany:     \"none\",\n\t\t\tAddress:     \"1111 yellow ave.\",\n\t\t\tCity:        \"Los Angeles\",\n\t\t\tState:       \"CA\",\n\t\t\tZip:         \"92039\",\n\t\t\tCountry:     \"USA\",\n\t\t\tPhoneNumber: \"8885555555\",\n\t\t},\n\t}\n\nresponse, err := customer.CreateShipping()\n\nif response.Ok() {\n    fmt.Println(\"New Shipping Added: #\",response.CustomerAddressID)\n} else {\n    fmt.Println(response.ErrorMessage())\n}\n```\n***\n\n:white_check_mark: getCustomerShippingAddressRequest\n```go\ncustomer := AuthorizeCIM.Customer{\n\t\tID: \"3842934233\",\n\t}\n\nresponse, err := customer.Info()\n\nshippingProfiles := response.ShippingProfiles()\n\nfmt.Println(\"Customer Shipping Profiles\", shippingProfiles)\n```\n***\n\n:white_check_mark: updateCustomerShippingAddressRequest\n```go\ncustomer := AuthorizeCIM.Profile{\n\t\tCustomerProfileId:  \"398432389\",\n\t\tCustomerAddressId: \"848388438\",\n\t\tShipping: \u0026Address{\n\t\t\tFirstName:   \"My\",\n\t\t\tLastName:    \"Name\",\n\t\t\tCompany:     \"none\",\n\t\t\tAddress:     \"1111 yellow ave.\",\n\t\t\tCity:        \"Los Angeles\",\n\t\t\tState:       \"CA\",\n\t\t\tZip:         \"92039\",\n\t\t\tCountry:     \"USA\",\n\t\t\tPhoneNumber: \"8885555555\",\n\t\t},\n\t}\n\nresponse, err := customer.UpdateShippingProfile()\n\nif response.Ok() {\n    fmt.Println(\"Shipping Profile was updated\")\n}\n```\n***\n\n:white_check_mark: deleteCustomerShippingAddressRequest\n```go\ncustomer := AuthorizeCIM.Customer{\n\t\tID: \"128749382\",\n\t\tShippingID: \"34892734829\",\n\t}\n\n\tresponse, err := customer.DeleteShippingProfile()\n\n\tif response.Ok() {\n\t\tfmt.Println(\"Shipping Profile was Deleted\")\n\t} else {\n\t\tfmt.Println(response.ErrorMessage())\n\t}\n```\n***\n\n:white_medium_square: getHostedProfilePageRequest\n\n:white_medium_square: createCustomerProfileFromTransactionRequest\n\n# Transaction Reporting\n\n:white_check_mark: getSettledBatchListRequest\n```go\nlist := AuthorizeCIM.Range{\n\t\tStart: LastWeek(),\n\t\tEnd:   Now(),\n\t}\n\nbatches := list.SettledBatch().List()\n\nfor _, v := range batches {\n    t.Log(\"Batch ID: \", v.BatchID, \"\\n\")\n    t.Log(\"Payment Method: \", v.PaymentMethod, \"\\n\")\n    t.Log(\"State: \", v.SettlementState, \"\\n\")\n}\n```\n***\n\n:white_check_mark: getUnSettledBatchListRequest\n```go\nbatches := AuthorizeCIM.UnSettledBatch().List()\n\nfor _, v := range batches {\n    t.Log(\"Status: \",v.TransactionStatus, \"\\n\")\n    t.Log(\"Amount: \",v.Amount, \"\\n\")\n    t.Log(\"Transaction ID: #\",v.TransID, \"\\n\")\n}\n\n```\n***\n\n:white_check_mark: getTransactionListRequest\n```go\nlist := AuthorizeCIM.Range{\n\t\tBatchId: \"6933560\",\n\t}\n\nbatches := list.Transactions().List()\n\nfor _, v := range batches {\n    t.Log(\"Transaction ID: \", v.TransID, \"\\n\")\n    t.Log(\"Amount: \", v.Amount, \"\\n\")\n    t.Log(\"Account: \", v.AccountNumber, \"\\n\")\n}\n```\n***\n\n:white_check_mark: getTransactionDetails\n```go\noldTransaction := AuthorizeCIM.PreviousTransaction{\n\t\tRefId: \"60019493304\",\n\t}\nresponse := oldTransaction.Info()\n\nfmt.PrintLn(\"Transaction Status: \",response.TransactionStatus,\"\\n\")\n```\n***\n\n:white_check_mark: getBatchStatistics\n```go\nlist := AuthorizeCIM.Range{\n\t\tBatchId: \"6933560\",\n\t}\n\nbatch := list.Statistics()\n\nfmt.PrintLn(\"Refund Count: \", batch.RefundCount, \"\\n\")\nfmt.PrintLn(\"Charge Count: \", batch.ChargeCount, \"\\n\")\nfmt.PrintLn(\"Void Count: \", batch.VoidCount, \"\\n\")\nfmt.PrintLn(\"Charge Amount: \", batch.ChargeAmount, \"\\n\")\nfmt.PrintLn(\"Refund Amount: \", batch.RefundAmount, \"\\n\")\n```\n***\n\n:white_check_mark: getMerchantDetails\n```go\ninfo := AuthorizeCIM.GetMerchantDetails()\n\nfmt.PrintLn(\"Test Mode: \", info.IsTestMode, \"\\n\")\nfmt.PrintLn(\"Merchant Name: \", info.MerchantName, \"\\n\")\nfmt.PrintLn(\"Gateway ID: \", info.GatewayID, \"\\n\")\n```\n***\n\n# ToDo\n* Organize and refactor some areas\n* Add Bank Account Support\n* Make tests fail if transactions fail (skipping 'duplicate transaction')\n\n### Authorize.net CIM Documentation\nhttp://developer.authorize.net/api/reference/#customer-profiles\n\n### Authorize.net Sandbox Access\nhttps://developer.authorize.net/hello_world/sandbox/\n\n# License\nThis golang package is release under MIT license.\nFeel free to submit a Pull Request if you have updates!\n\n*This software gets reponses in JSON, but Authorize.net currently says \"JSON Support is in BETA, please contact us if you intend to use it in production.\"* Make sure you test in sandbox mode!\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunterlong%2Fauthorizecim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhunterlong%2Fauthorizecim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunterlong%2Fauthorizecim/lists"}