Homec4science

Fix a bug with creating Phortune merchant accounts without applying an email…

Authored by epriestley <git@epriestley.com> on Nov 3 2016, 21:38.

Description

Fix a bug with creating Phortune merchant accounts without applying an email address transaction and some null field issues

Summary:
When Phortune merchant accounts are created via mechanisms other than the web UI (for example, by Phacility unit tests) this validation check may fail.

Transactions are validated even if no transactions of the given type are being applied, to allow the editor to raise errors like "Name is required!".

If there's no TYPE_INVOICEEMAIL transaction, we'll get called with empty $xactions and fail on strlen($new_email) because the variable is never defined.

As a secondary issue, if contactInfo, invoiceEmail or invoiceFooter are not provided the record will fail to insert (none of these are nullable).

Test Plan: Ran Phacility unit tests, got a clean result for new instance creation.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16798

Details

Committed
epriestley <git@epriestley.com>Nov 4 2016, 17:52
Pushed
aubortJan 31 2017, 17:16
Parents
rPH0f1785c0aa8c: Allow EditEngine to build NUX buttons that point at the right place
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHc2565d5e2437: Fix a bug with creating Phortune merchant accounts without applying an email… (authored by epriestley <git@epriestley.com>).Nov 4 2016, 17:52