Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous payment #35

Merged
merged 6 commits into from Aug 28, 2020
Merged

Continuous payment #35

merged 6 commits into from Aug 28, 2020

Conversation

javidlulu
Copy link
Member

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you read and signed the automated Contributor's License Agreement?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you lint your code locally prior to submission?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@blackduck-copilot
Copy link

blackduck-copilot bot commented Aug 27, 2020

Black Duck Security Report

Merging #35 into master will not change security risk.

Click here to see full report

@codeclimate
Copy link

codeclimate bot commented Aug 27, 2020

Code Climate has analyzed commit be8b252 and detected 0 issues on this pull request.

View more on Code Climate.

@@ -106,6 +107,32 @@ private static void createAccountLinkQrCode(final PaymentApi apiInstance){
System.out.println(e.getResponseBody());
}

}
private static void continuousPaymentFlow(WalletApi walletApiInstance, PaymentApi paymentApi, String userAuthorizationId){
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@@ -270,6 +297,36 @@ private static PaymentDetails createPayment(final PaymentApi apiInstance, String
return result;
}

private static PaymentDetails createContinuousPayment(final PaymentApi apiInstance, String merchantPaymentId,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method createContinuousPayment has 26 lines of code (exceeds 25 allowed). Consider refactoring.

@@ -106,6 +107,32 @@ private static void createAccountLinkQrCode(final PaymentApi apiInstance){
System.out.println(e.getResponseBody());
}

}
private static void continuousPaymentFlow(WalletApi walletApiInstance, PaymentApi paymentApi, String userAuthorizationId){
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method continuousPaymentFlow has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.

@@ -142,15 +146,20 @@ private static void appInvokeFlow(final PaymentApi paymentApi, final WalletApi w
}
}

private static void directDebitFlow(WalletApi walletApiInstance, PaymentApi paymentApi, String userAuthorizationId){
private static void directDebitFlow(WalletApi walletApiInstance, PaymentApi paymentApi, String userAuthorizationId, boolean continuousPayment){
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method directDebitFlow has 27 lines of code (exceeds 25 allowed). Consider refactoring.

@shreyanshp shreyanshp merged commit 16617e6 into master Aug 28, 2020
@shreyanshp shreyanshp deleted the continuous-payment branch August 28, 2020 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants