original_string: public function toBankCard(array $params)
      {
          foreach (['bank_code', 'partner_trade_no', 'enc_bank_no', 'enc_true_name', 'amount'] as $key) {
              if (empty($params[$key])) {
                  throw new RuntimeException(\sprintf('"%s" is required.', $key));
              }
          }
  
          $publicKey = file_get_contents($this->app['config']->get('rsa_public_key_path'));
  
          $params['enc_bank_no'] = rsa_public_encrypt($params['enc_bank_no'], $publicKey);
          $params['enc_true_name'] = rsa_public_encrypt($params['enc_true_name'], $publicKey);
  
          return $this->safeRequest('mmpaysptrans/pay_bank', $params);
      }
code: public function toBankCard(array $params)
      {
          foreach (['bank_code', 'partner_trade_no', 'enc_bank_no', 'enc_true_name', 'amount'] as $key) {
              if (empty($params[$key])) {
                  throw new RuntimeException(\sprintf('"%s" is required.', $key));
              }
          }
  
          $publicKey = file_get_contents($this->app['config']->get('rsa_public_key_path'));
  
          $params['enc_bank_no'] = rsa_public_encrypt($params['enc_bank_no'], $publicKey);
          $params['enc_true_name'] = rsa_public_encrypt($params['enc_true_name'], $publicKey);
  
          return $this->safeRequest('mmpaysptrans/pay_bank', $params);
      }
code_tokens: public function toBankCard ( array $ params ) { foreach ( [ 'bank_code' , 'partner_trade_no' , 'enc_bank_no' , 'enc_true_name' , 'amount' ] as $ key ) { if ( empty ( $ params [ $ key ] ) ) { throw new RuntimeException ( \ sprintf ( '"%s" is required.' , $ key ) ) ; } } $ publicKey = file_get_contents ( $ this -> app [ 'config' ] -> get ( 'rsa_public_key_path' ) ) ; $ params [ 'enc_bank_no' ] = rsa_public_encrypt ( $ params [ 'enc_bank_no' ] , $ publicKey ) ; $ params [ 'enc_true_name' ] = rsa_public_encrypt ( $ params [ 'enc_true_name' ] , $ publicKey ) ; return $ this -> safeRequest ( 'mmpaysptrans/pay_bank' , $ params ) ; }
docstring: Send MerchantPay to BankCard.
  
  @param array $params
  
  @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
  
  @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
  @throws \EasyWeChat\Kernel\Exceptions\RuntimeException
docstring_tokens: Send MerchantPay to BankCard .