Hunterlong/AuthorizeCIM

View on GitHub

Showing 262 of 262 total issues

File customer_profile.go has 533 lines of code (exceeds 500 allowed). Consider refactoring.
Open

package AuthorizeCIM

import (
    "encoding/json"
)
Severity: Minor
Found in customer_profile.go - About 2 hrs to fix

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    func (sub SetSubscription) Status() (*SubscriptionStatus, error) {
        action := GetSubscriptionStatusRequest{
            ARBGetSubscriptionStatusRequest: ARBGetSubscriptionRequest{
                MerchantAuthentication: GetAuthentication(),
                SubscriptionID:         sub.Id,
    Severity: Major
    Found in recurring_billing.go and 2 other locations - About 1 hr to fix
    recurring_billing.go on lines 181..199
    recurring_billing.go on lines 228..246

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 144.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    func (sub SetSubscription) Cancel() (*SubscriptionCancel, error) {
        action := GetSubscriptionCancelRequest{
            ARBCancelSubscriptionRequest: ARBGetSubscriptionRequest{
                MerchantAuthentication: GetAuthentication(),
                SubscriptionID:         sub.Id,
    Severity: Major
    Found in recurring_billing.go and 2 other locations - About 1 hr to fix
    recurring_billing.go on lines 181..199
    recurring_billing.go on lines 208..226

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 144.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    func (sub SetSubscription) Info() (*GetSubscriptionResponse, error) {
        action := GetSubscriptionRequest{
            ARBGetSubscriptionRequest: ARBGetSubscriptionRequest{
                MerchantAuthentication: GetAuthentication(),
                SubscriptionID:         sub.Id,
    Severity: Major
    Found in recurring_billing.go and 2 other locations - About 1 hr to fix
    recurring_billing.go on lines 208..226
    recurring_billing.go on lines 228..246

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 144.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func SendSubscription(sub Subscription) (*SubscriptionResponse, error) {
        action := CreateSubscriptionRequest{
            ARBCreateSubscriptionRequest: ARBCreateSubscriptionRequest{
                MerchantAuthentication: GetAuthentication(),
                Subscription:           sub,
    Severity: Major
    Found in recurring_billing.go and 1 other location - About 1 hr to fix
    payment_transactions.go on lines 110..128

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 138.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func SendTransactionRequest(input TransactionRequest) (*TransactionResponse, error) {
        action := CreatePayment{
            CreateTransactionRequest: CreateTransactionRequest{
                MerchantAuthentication: GetAuthentication(),
                TransactionRequest:     input,
    Severity: Major
    Found in payment_transactions.go and 1 other location - About 1 hr to fix
    recurring_billing.go on lines 132..150

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 138.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func GetMerchantDetails() (*MerchantDetailsResponse, error) {
        new := GetMerchantDetailsRequest{
            GetMerchantDetailsReq: GetMerchantDetailsReq{
                MerchantAuthentication: GetAuthentication(),
            },
    Severity: Minor
    Found in transaction_reporting.go and 1 other location - About 45 mins to fix
    transaction_reporting.go on lines 39..53

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func UnSettledBatch() (*UnsettledTransactionListResponse, error) {
        new := GetUnsettledBatchTransactionListRequest{
            GetUnsettledTransactionList: GetUnsettledTransactionList{
                MerchantAuthentication: GetAuthentication(),
            },
    Severity: Minor
    Found in transaction_reporting.go and 1 other location - About 45 mins to fix
    transaction_reporting.go on lines 101..115

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Your code does not pass gofmt in 4 places. Go fmt your code!
    Open

    package main
    Severity: Minor
    Found in _examples/new_transaction/main.go by gofmt

    exported function ChargeCustomer should have comment or be unexported
    Open

    func ChargeCustomer() {
    Severity: Minor
    Found in _examples/new_transaction/main.go by golint

    exported function GetAuthentication should have comment or be unexported
    Open

    func GetAuthentication() MerchantAuthentication {
    Severity: Minor
    Found in authorizecim.go by golint

    exported function SendRequest should have comment or be unexported
    Open

    func SendRequest(input []byte) ([]byte, error) {
    Severity: Minor
    Found in authorizecim.go by golint

    exported type GetCustomerPaymentProfileListResponse should have comment or be unexported
    Open

    type GetCustomerPaymentProfileListResponse struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type ValidateCustomerPaymentProfileResponse should have comment or be unexported
    Open

    type ValidateCustomerPaymentProfileResponse struct {
    Severity: Minor
    Found in customer_profile.go by golint

    exported type GetUnsettledTransactionListRequest should have comment or be unexported
    Open

    type GetUnsettledTransactionListRequest struct {
    Severity: Minor
    Found in fraud_management.go by golint

    exported method PreviousTransaction.Void should have comment or be unexported
    Open

    func (tranx PreviousTransaction) Void() (*TransactionResponse, error) {
    Severity: Minor
    Found in payment_transactions.go by golint

    exported function GetHostedPaymentPage should have comment or be unexported
    Open

    func GetHostedPaymentPage() {
    Severity: Minor
    Found in payment_transactions.go by golint

    exported type Message should have comment or be unexported
    Open

    type Message struct {
    Severity: Minor
    Found in payment_transactions.go by golint

    exported method Profile.CreateProfile should have comment or be unexported
    Open

    func (profile Profile) CreateProfile() (*CustomProfileResponse, error) {
    Severity: Minor
    Found in customer_profile.go by golint

    exported function GetProfileIds should have comment or be unexported
    Open

    func GetProfileIds() ([]string, error) {
    Severity: Minor
    Found in customer_profile.go by golint
    Severity
    Category
    Status
    Source
    Language