Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-3505

Add option to disable ACH/CC payments for new Order signups

    Details

      Description

      When a user signs up from the Order system, a new client is created and sets a few override settings. This needs to be updated to set additional setting overrides for whether to allow ACH/CC payments, which are settings already in the core.

        Activity

        tyson Tyson Phillips (Inactive) created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Story Points 3
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.9.0 Sprint 4 [ 102 ]
        tyson Tyson Phillips (Inactive) made changes -
        Assignee Tyson Phillips [ tyson ]
        Automated transition triggered when Tyson Phillips (Inactive) created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        tyson Tyson Phillips (Inactive) made changes -
        Description When a user signs up from the Order system, a new client is created and sets a few override settings. This needs to be updated to set additional setting overrides for whether to allow ACH/CC payments, which are settings already in the core. When a user signs up from the Order system, a new client is created and sets a few override settings. This needs to be updated to set additional setting overrides for whether to allow ACH/CC payments, which are settings already in the core.

        Hide
        tyson Tyson Phillips (Inactive) 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.

        1. 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'
            ];
            
        2. 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.

        Show
        tyson Tyson Phillips (Inactive) 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.
        tyson Tyson Phillips (Inactive) made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        tyson Tyson Phillips (Inactive) made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 2 hours, 23 minutes [ 8580 ]
        Worklog Id 13189 [ 13189 ]
        jonathan Jonathan Reissmueller made changes -
        Time Spent 2 hours, 23 minutes [ 8580 ] 2 hours, 56 minutes [ 10560 ]
        Worklog Id 13194 [ 13194 ]
        Automated transition triggered when Tyson Phillips (Inactive) merged pull request #794 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            tyson Tyson Phillips (Inactive)
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              31/Mar/20

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 2 hours, 56 minutes
              2h 56m

                Agile