Show
added a comment - This task will add a configurable setting to the Order plugin to control this behavior. In the interim, however, it is possible to disable ACH/CC payments from being created/accepted on signup via the Order plugin by updating a couple files.
Update /app/models/clients.php, i.e. Clients::create
Find ~line 128
$fields = [
'autodebit', 'autosuspend', 'default_currency', 'inv_address_to',
'inv_method', 'language', 'tax_exempt', 'tax_id', 'username_type',
'send_registration_email', 'receive_email_marketing'
];
Add the "payments_allowed_ach" and "payments_allowed_cc" settings to that list, i.e.:
$fields = [
'autodebit', 'autosuspend', 'default_currency', 'inv_address_to',
'inv_method', 'language', 'tax_exempt', 'tax_id', 'username_type',
'send_registration_email', 'receive_email_marketing',
'payments_allowed_ach', 'payments_allowed_cc'
];
Update /plugins/order/controllers/signup.php, i.e. Signup::index
Find ~line 88
$client_info['settings'] = [
'username_type' => $ this ->post['username_type'],
'tax_id' => ($show_client_tax_id == ' true ' ? $ this ->post['tax_id'] : ''),
'default_currency' => $ this ->SessionCart->getData('currency'),
'language' => $company_settings['language'],
'receive_email_marketing' => (isset($ this ->post['receive_email_marketing'])
? $ this ->post['receive_email_marketing']
: ' false '
)
];
Add the "payments_allowed_ach" and "payments_allowed_cc" settings to that list and set them to "false" to disable them automatically for any new signups, i.e.:
$client_info['settings'] = [
'username_type' => $ this ->post['username_type'],
'tax_id' => ($show_client_tax_id == ' true ' ? $ this ->post['tax_id'] : ''),
'default_currency' => $ this ->SessionCart->getData('currency'),
'language' => $company_settings['language'],
'receive_email_marketing' => (isset($ this ->post['receive_email_marketing'])
? $ this ->post['receive_email_marketing']
: ' false '
),
'payments_allowed_ach' => ' false ',
'payments_allowed_cc' => ' false '
];
On the client's profile page, under "Payment Accounts", there is a widget cog icon that, when clicked, takes you to set these settings for the client. This will allow staff to re-enable ACH/CC payment accounts manually after they've signed up.
This task will add a configurable setting to the Order plugin to control this behavior. In the interim, however, it is possible to disable ACH/CC payments from being created/accepted on signup via the Order plugin by updating a couple files.
On the client's profile page, under "Payment Accounts", there is a widget cog icon that, when clicked, takes you to set these settings for the client. This will allow staff to re-enable ACH/CC payment accounts manually after they've signed up.