WeChat Pay - MagentoAccess to WeChat Pay API: Before use our module, please request WeChat Pay QR...

Post on 12-Jun-2020

14 views 0 download

Transcript of WeChat Pay - MagentoAccess to WeChat Pay API: Before use our module, please request WeChat Pay QR...

WeChat Pay

V1.x for M2

User Guide / SunflowerBiz

Table of Contents

1. Installation

2. Module setting

3. JSAPI Configuration

4. H5 Configuration

5. WeChat Pay in Front

6. WeChat Payment Process

7. Payment Success

8. Access to WeChat Pay API

9. Notifications

Email: info@sunflowerbiz.com

Installation:

From your base Magento2 directory -> app -> code (you may have to createthis directory), create the Sunflowerbiz directory to your app/codedirectory.

From the base Magento2 directory:-Upload the contents of 'Wechat' directory to 'app/code/Sunflowerbiz'directory of your Magento installation-Enable the module running the following commands on the root of yourMagento installation:bin/magento module:enable --clear-static-content Sunflowerbiz_Wechatbin/magento setup:upgrade

--------------------The following commands should work even in windows with the forwardslash swapped for back.

php bin/magento cache:cleanphp bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy

Email: info@sunflowerbiz.com

Module Setting:

1. Go to Admin Panel, navigate to STORES and click on Configuration.

2. Expand SALES and choose Payment Methods in the dropdown.

3. Set up WeChat Pay

1) Expand the WeChat section to start the configuration.

2) Fill out the Merchant ID, AppID, AppKey, and AppSecret that WeChatprovides for you.

A) Merchant ID

A1) Log into WeChat Pay Merchant Platform

A2) Enter 微信支付商户号 (WeChat Merchant ID) under 账户信息(Acccount Info)as Merchant ID.

B) AppKey

BI) Scroll down to Account Setting (账户设置) and click API Security (API 安全)

BII) Set API Key

Click Set to create a 32-digit key by your own and enter it as AppKey

C) Configure JSAPI

CI) Click Development Configuration under Product Center

CII) Set JSAPI Authorization Catalog under Payment Configuration

CIII) Click Add Enter: http or https://your site domain/wechat/process/redirect/

---------------------------------------------------------------------------------------------- Go to WeChat Official Accounts Platform---------------------------------------------------------------------------------

D) AppID and AppSecret

DI) Log into WeChat Official Accounts Platform

DII) Scroll down to Development and click Basic Configuration

DIII) Enter Developer ID as AppID and Developer Password as AppSecret.

E) Configure Webpage Authorization Domain

EI) Click Function Setting at the top right corner under Account.

EII) Configure Webpage Authorization Domain under WeChat OfficialAccounts Configuration.

EIII) Click Set button

EIV) Download the txt file and upload to your Magento site root.

◦ It require a filing domain and doesn't support IP address, portnumber or short-chain domain name.

F) Enable JSAPI/H5 and Log

Select Yes to enable JSAPI and H5 Pay. Select Yes to enable transaction log. Choose order status name when WeChat accepts payment.

Front Page:

After the configuration, a customer will see Wechat Pay as a payment methodunder Review & Payment.

WeChat Pay QR Code API

After selecting to pay with WeChat, it will auto generate a QR code for the customersto scan with their phone.

WeChat Pay JSAPI When a customer tries to checkout in WeChat browser, it will auto call WeChat PayApp to complete the payment.

H5 Payment APIIf a customer opens HTML5 pages using non-wechat browsers, it will auto callwechat app to complete the payment.

Payment Success

After the payment, customers will go to the payment success page.

Access to WeChat Pay API:

Please request WeChat Pay QR Code API , WeChat Official Account PaymentAPI and WeChat H5 Payment API on WeChat official site to get necessaryinfo to configure in our module setting page.

Step 1: Request ‘WeChat Official Account’: https://mp.weixin.qq.com/ Step 2: Request ‘WeChat Pay Merchant Account’Step 3: Sign Online Agreement

Read More info

Notifications

1. Support Magento 2.x

2. Support Magento Community and Enterprise.

Email: info@sunflowerbiz.com