WEB JS SDK / Usage

Scenario

ECPay’s JavaScript (JS) SDK is a front-end library, which could be used to display ECPay’s payment methods on merchant’s webpage. For more details please also have a look of its sample code.

Usage

  • Step 1. The ECPayPayment div will display the ECPay’s payment screen.
				
					<div id="ECPayPayment"></div>

				
			
  • Step 2. To include JavaScript open source
				
					<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>

				
			
  • Step 3. To include ECPay’s
    • Stage
				
					<script src="https://ecpg-stage.ecpay.com.tw/Scripts/sdk-1.0.0.js?t=20210121100116"></script>
				
			
    • Production
				
					<script src="https://ecpg.ecpay.com.tw/Scripts/sdk-1.0.0.js?t=20210121100116"></script>
				
			

❗ Special notes:

  • when using ECPay’s JS SDK, be sure to place the SDK after ECPayPayment div.
  • When defining CSS parameters, please do not define same as ECPay’s (List of CSS parameter definition.)

Copyright © Green World FinTech Service Co., Ltd. All rights reserved.

Green World