1， 将app 目录直接覆盖项目即可， 放心不会影响其它支付。
2， 在 config -> .config.php 文件中 
	修改 $_ENV['payment_system'] = 'motionpay';  
	在下面增加俩行 
		#motionpay设置
		$_ENV['motionpay_apiurl'] = '';// 接口地址（https开头/结尾）
		$_ENV['motionpay_pid'] = '';// 商户号
		$_ENV['motionpay_key'] = '';// 密钥
3， 在app -> Services -> Payment.php 中   (如果你是原版代码未自己修改的 可以直接使用包内的文件进行覆盖)
	增加  use App\Services\Gateway\MotionPay;
	在getClient()函数中增加
	case ('motionpay'):
                return new MotionPay();
4,   在 resources -> views -> malio -> user -> shop.tpl  文件中 (如果你是原版代码未自己修改的 可以直接使用包内的文件进行覆盖)
	在body标签内 增加以下代码
	{if $config['payment_system'] == 'motionpay'}
	<div class="modal fade" tabindex="-1" role="dialog" id="motionpay-modal">
	  <div class="modal-dialog" role="document">
	    <div class="modal-content">
	      <div class="modal-header">
		<h5 class="modal-title">{$i18n->get('payment')}</h5>
	      </div>
	      <div class="modal-body">
		<div style="text-align: center">{$i18n->get('pay-now-modal-text')}</div>
	      </div>
	      <div class="modal-footer bg-whitesmoke br">
		<a id="to-motionpay" href="##" target="blank" class="btn btn-primary">{$i18n->get('continue-pay')}</a>
	      </div>
	    </div>
	  </div>
	</div>
	{/if}

4,  在 public -> theme -> malio -> js -> malio.js 文件中 (如果你是原版代码未自己修改的 可以直接使用包内的文件进行覆盖)
	找到 function topUp  这个函数 在最上方增加 
	 if (paymentSystem == 'motionpay') {
		motionpay(_0x3296b9);
	 }

	找到 function walletTopup 这个函数 在最上方增加 
	 if (paymentSystem == 'motionpay') {
		motionpay(_0x1ed654);
	    }

	再增加一个函数
	function motionpay(_0x2052b5) {
	    if (!csKdOsOtLF.includes(location.host)) {
		return false;
	    }
	    ;$.ajax({
		'url': '/user/payment/purchase',
		'data': {'price': _0x2052b5},
		'dataType': 'json',
		'type': 'POST',
		'success': function (_0x45dca1) {
		    if (_0x45dca1['code'] == 0) {
			var _0x3be006 = document.location.toString().split('#')[0].split('?')[0];
			var _0x2d13c8 = _0x3be006['split']('//')[1].split('/')[0x2];
			if (_0x2d13c8 == 'code') {
			    window.location.href = _0x45dca1['url'];
			} else {
			    $('#motionpay-modal').modal({
				'backdrop': 'static',
				'keyboard': false
			    });
			    $('#motionpay-modal').modal('show');
			    $('#to-motionpay').attr('href', _0x45dca1['url']);
			}
		    } else {
			Swal.fire('发生错误', _0x45dca1['msg'], 'error');
		    }
		}
	    });
	}
	