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

Feature/dtpayetwo 759 hw parity paypal account java dev #194

Conversation

akswaminathan-pp-dev
Copy link
Contributor

JIRA Ticket: DTPAYETWO-759

JIRA Tickets:


Overview

The Design Documentation can be found here: HW Parity with Masspay (REST API)

Currently when creating External Accounts (EA) such as PayPal & Venmo through the REST API method, account numbers were specified to be the following:

EA Type Account Number Type
PayPal Email
Venmo Phone Number

This has now been changed to support the following:

EA Type Account Number Type
PayPal Email, Phone Number, PayPal PayerID
Venmo Email, Phone Number, Venmo Handle, Venmo External ID

With this change, there is a new option to use the "accountId" key-value pair in the HTTP POST Request Body. When GETting an EA, the response body will show this "accountId" value as well. Users are still able to use the "email" key-value if they wish to as well.

OLD:
{
    "type": "PAYPAL_ACCOUNT",
    "transferMethodCountry": "US",
    "transferMethodCurrency": "USD",
    "email": "user@domain.com"
}

------------------------------------------------

NEW:
{
    "type": "PAYPAL_ACCOUNT",
    "transferMethodCountry": "US",
    "transferMethodCurrency": "USD",
    "accountId": "user@domain.com"
}

Added new wallet attribute USE_EMAIL_TAG_FOR_PAYPAL_EA_REST_API.

  • If this is enabled for a merchant then they will continue using 'email' in API request & response representation will also have 'email'.
  • If this is disabled for a merchant then they will be using 'accountId' in API request & response representation will also have 'accountId'.

Hence we have added a generic error 'email/accountId is required' to accomodate both based on wallet attribute USE_EMAIL_TAG_FOR_PAYPAL_EA_REST_API. Moving forward all merchants will start using accountId.

Copy link
Collaborator

@grmeyer-hw-dev grmeyer-hw-dev left a comment

Choose a reason for hiding this comment

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

LGTM

… feature/DTPAYETWO-759-HWParity_PaypalAccountJavaDev

# Conflicts:
#	CHANGELOG.md
#	src/test/java/com/hyperwallet/clientsdk/HyperwalletIT.java
@@ -3377,6 +3377,93 @@ public void testGetPayPalAccountDefaultTransfer() throws Exception {
String functionality = "getPayPalAccountDefaultTransfer";
initMockServer(functionality);

@Test
Copy link
Collaborator

Choose a reason for hiding this comment

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

The testGetPayPalAccountDefaultTransfer() method is missing code.

@@ -3377,6 +3377,93 @@ public void testGetPayPalAccountDefaultTransfer() throws Exception {
String functionality = "getPayPalAccountDefaultTransfer";
initMockServer(functionality);

@Test
public void createPayPalAccountWithAccountId() throws Exception {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor The test name should be testCreatePayPalAccountWithAccountId()

@akswaminathan-pp-dev akswaminathan-pp-dev marked this pull request as ready for review August 8, 2023 16:37
@akswaminathan-pp-dev akswaminathan-pp-dev merged commit f1c01ae into master Aug 8, 2023
14 checks passed
@delete-merged-branch delete-merged-branch bot deleted the feature/DTPAYETWO-759-HWParity_PaypalAccountJavaDev branch August 8, 2023 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants