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

PayPal payout error: Cannot read properties of undefined (reading 'senderFees') #6581

Closed
Betree opened this issue Mar 20, 2023 · 1 comment · Fixed by opencollective/opencollective-api#8717
Assignees
Labels
api Issues that require some work on the API (https://github.com/opencollective/opencollective-api) bug complexity → simple priority

Comments

@Betree
Copy link
Member

Betree commented Mar 20, 2023

Reported in https://opencollective.slack.com/archives/C0429NTTABF/p1679304696758789 (private)

It looks like PayPal made yet another breaking change to their API:
image

In some cases, createPaymentResponse.defaultFundingPlan looks like it's not set.

Impacted expense: https://opencollective.com/siduction-eu/expenses/129072. The PayPal response looks like:

{
  "createPaymentResponse": {
    "responseEnvelope": {
      "timestamp": "2023-03-20T02:23:22.144-07:00",
      "ack": "Success",
      "correlationId": "[OBFUSCATED]",
      "build": "[OBFUSCATED]"
    },
    "payKey": "[OBFUSCATED]",
    "paymentExecStatus": "CREATED",
    "httpStatusCode": 200,
    "paymentApprovalUrl": "https://www.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey=[OBFUSCATED]"
  },
  "executePaymentResponse": {
    "responseEnvelope": {
      "timestamp": "2023-03-20T02:23:27.815-07:00",
      "ack": "Success",
      "correlationId": "[OBFUSCATED]",
      "build": "[OBFUSCATED]"
    },
    "paymentExecStatus": "COMPLETED",
    "httpStatusCode": 200
  }
}

Looks like we may have to fetch the details from PayPal's API. Note that it doesn't seem to be affecting all expenses, as the admin noted:

ok - i have paid two in the meantime (that went smoothly though): https://opencollective.com/collective-y/expenses/129191, https://opencollective.com/collective-y/expenses/129193

@Betree Betree added bug complexity → simple api Issues that require some work on the API (https://github.com/opencollective/opencollective-api) priority labels Mar 20, 2023
@Betree Betree self-assigned this Mar 22, 2023
@Betree
Copy link
Member Author

Betree commented Mar 22, 2023

I can now confirm that a payment processor fee was charged on this transaction, PayPal didn't notice us about it in the payload. We'll need to fetch the information from their API.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues that require some work on the API (https://github.com/opencollective/opencollective-api) bug complexity → simple priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant