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

Process payments in WHMCS #4

Closed
ju5t opened this issue Nov 29, 2018 · 3 comments
Closed

Process payments in WHMCS #4

ju5t opened this issue Nov 29, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@ju5t
Copy link
Contributor

ju5t commented Nov 29, 2018

Once a payment has been mapped in Moneybird it should result in a transaction in WHMCS.

  • Transactions are mapped 1 on 1. No duplicate transactions are allowed.
  • Transactions probably shouldn't give out credit for overpayment.
  • An interface to manage hooks in Moneybird is required.
  • Manage duplicate payments from integrated Payment Service Providers.

Some payment service providers are integrated into WHMCS. A PayPal payment will be processed in WHMCS before it's available Moneybird. This could result in duplicate transactions. We could test for this edge case by searching for a transaction that was done on the same day, for the same amount. This is not 100% fool proof and edge cases will exist.

ju5t added a commit that referenced this issue Jan 2, 2019
As this requires thorough testing it will only log potential
transactions in our own log table. Once we're happy with
the results we will update this version to process payments
in WHMCS.
@ju5t
Copy link
Contributor Author

ju5t commented Jan 2, 2019

In a0129c3 the cron uses a filter of this_year to select the transactions it will process. This can probably be reduced to this_month too. It would make more sense to get the last month(s) instead. This can be done with 201812..201901.

ju5t added a commit that referenced this issue Jan 2, 2019
@ju5t ju5t added the enhancement New feature or request label Jan 2, 2019
@ju5t
Copy link
Contributor Author

ju5t commented Jan 5, 2019

The current implementation struggles with lots of transactions. We link invoices using the invoice number in WHMCS and the public invoice number in Moneybird. The internal id is not stored. As financial mutations give back the internal id we need another call to get the actual invoice number in WHMCS to match a payment. As API calls are limited to 150 every 5 minutes this requires a change in how we link invoices in Moneybird.

ju5t added a commit that referenced this issue Jan 7, 2019
ju5t added a commit that referenced this issue Jan 27, 2019
The default endpoint is not only limited it will also
trigger an exception. This is undesired (and a little
strange) so we're switching to the synchronization
endpoint.
ju5t added a commit that referenced this issue Jan 27, 2019
ju5t added a commit that referenced this issue Jan 27, 2019
@ju5t
Copy link
Contributor Author

ju5t commented Jan 27, 2019

This has been tested thoroughly and is ready to be included in the next release.

@ju5t ju5t closed this as completed Jan 27, 2019
@DaanVri DaanVri mentioned this issue Aug 16, 2019
Closed
@ghost ghost mentioned this issue Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant