[Skip to main content](#vessel-content)

#   Wechat Payment API Document - EN version

##

- **[iaiai](/forum/user/50720-iaiai "View iaiai's Profile")**
- [![iaiai's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/50720-iaiai "View iaiai's Profile") Topic Author
- [ Offline](/forum/user/50720-iaiai)

Less More

- Posts: 12
- Thank you received: 2
-
-

9 years 3 months ago -  9 years 3 months ago [\#274393](#274393) by [iaiai](/forum/user/50720-iaiai "View iaiai's Profile")  *[Wechat Payment API Document - EN version](/forum/29-payment-methods/891225-wechat-payment-api-document-en-version#274393 "-- HikaShop version -- : 3 -- Joomla version -- : 3.6.5  hi,  I have found the whole wechat payment api document for you.  1-4 for WEB payment.  Hope this helps.")* was created by *[iaiai](/forum/user/50720-iaiai "View iaiai's Profile")*

-- HikaShop version -- : 3
-- Joomla version -- : 3.6.5

hi,

I have found the whole wechat payment api document for you.

1-4 for WEB payment.

Hope this helps.

*This attachment is hidden for guests.
Please log in or register to see it.*

*This attachment is hidden for guests.
Please log in or register to see it.*

*This attachment is hidden for guests.
Please log in or register to see it.*

[ ![wechatpayforWEB&#95;2017-07-21-2.PNG](/forum/attachment/39294) ](/forum/attachment/39294 "...17-07-21-2.PNG")

- [ ![wechatpayforWEB&#95;2017-07-21-2.PNG](/forum/attachment/39294) ](/forum/attachment/39294 "...17-07-21-2.PNG") [ ](/forum/attachment/39294?download=1 "...17-07-21-2.PNG")

Last edit: 9 years 3 months ago by [iaiai](/forum/user/50720-iaiai "View iaiai's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTEyMjUtd2VjaGF0LXBheW1lbnQtYXBpLWRvY3VtZW50LWVuLXZlcnNpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

9 years 3 months ago [\#274411](#274411) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Wechat Payment API Document - EN version](/forum/29-payment-methods/891225-wechat-payment-api-document-en-version#274411 "-- HikaShop version -- : 3 -- Joomla version -- : 3.6.5  hi,  I have found the whole wechat payment api document for you.  1-4 for WEB payment.  Hope this helps.")*

Hello,

Thank you for providing us with these documentation, we can eventually ad that payment plugin on our Todo list.
Note that if you want to be developed fast, you can also contact one of our partner via :
[ www.hikashop.com/home/our-partners.html](https://www.hikashop.com/home/our-partners.html)

The following user(s) said Thank You: [iaiai](/forum/user/50720-iaiai "View iaiai's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTEyMjUtd2VjaGF0LXBheW1lbnQtYXBpLWRvY3VtZW50LWVuLXZlcnNpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[iaiai](/forum/user/50720-iaiai "View iaiai's Profile")**
- [![iaiai's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/50720-iaiai "View iaiai's Profile") Topic Author
- [ Offline](/forum/user/50720-iaiai)

Less More

- Posts: 12
- Thank you received: 2
-
-

9 years 1 week ago [\#281319](#281319) by [iaiai](/forum/user/50720-iaiai "View iaiai's Profile")  Replied by *[iaiai](/forum/user/50720-iaiai "View iaiai's Profile")* on topic *[Wechat Payment API Document - EN version](/forum/29-payment-methods/891225-wechat-payment-api-document-en-version#281319 "-- HikaShop version -- : 3 -- Joomla version -- : 3.6.5  hi,  I have found the whole wechat payment api document for you.  1-4 for WEB payment.  Hope this helps.")*

Hi,

I have made a wechat payment plug-in based on official demo document, it includes 2 payment type, JSAPI and NATIVE.

The payment type, JSAPI, that can only be used inner wechat app.
And the type of Native (Scan a QR with wehcat app) can be used when a customer complete payment on PC.

You can test the demo of payment if you have installed wechat app on your mobile phone. [ paysdk.weixin.qq.com](http://paysdk.weixin.qq.com)
For JSAPI payment, you must open the link on wechat app with the MicroMessenger browser.

Now, it still have some issues when I tested it.

Native payment can be done successfully, but callback notification can not run correctly.

JSAPI payment can not run correctly, it can only obtain a redirect code, can not obtain the user's openID and submit the order data to WeChat server for unified order operation (see [ admin.wechat.com/wiki/index.php?title=User\_Profile\_via\_Web](http://admin.wechat.com/wiki/index.php?title=User_Profile_via_Web)).

OpenID is only needed for JSAPI payment but not for Native payment.

Callback notification process is the same for them.

When I test on PC with the NATIVE payment, I will not see a QR code to complete payment.
Because the function of GetPayUrl can't get parameter value of AppID and Key, unless use hard code in lib files.

I think that if wechat pay functions are written into the same class (plgHikashoppaymentWechatpay), it may be simple and running correctly.

But, maybe it's better to use the official demo libs.

So, can anyone give me some ideas?

I hope it's helpful to develop this plugin and add a new payment method for Hikashop, which is the best E-Commerce component with Joomla.

Here is the wechat official website (EN) [ pay.weixin.qq.com/wechatpay\_guide/help\_docs.shtml](https://pay.weixin.qq.com/wechatpay_guide/help_docs.shtml)

Attachment is my FULL wechat payment plug-in files.  *This attachment is hidden for guests.
Please log in or register to see it.*

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTEyMjUtd2VjaGF0LXBheW1lbnQtYXBpLWRvY3VtZW50LWVuLXZlcnNpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

9 years 1 week ago -  9 years 1 week ago [\#281401](#281401) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Wechat Payment API Document - EN version](/forum/29-payment-methods/891225-wechat-payment-api-document-en-version#281401 "-- HikaShop version -- : 3 -- Joomla version -- : 3.6.5  hi,  I have found the whole wechat payment api document for you.  1-4 for WEB payment.  Hope this helps.")*

Hello,

From what we know hard to tell you what is lacking, in order to process your test don't forget to use the [ **log**](https://www.hikashop.com/support/documentation/295).
The idea is to process **step by step** in order to see **sent elements** and **received from Payment servers**.
In your plugin this kind of code will sent in the log :
Code:

$this-&gt;writeToLog("1° elements sent to Payment server :\r\n\r\n" . print_r($myElements,true) . "\r\n Recieved elements from payment servers :\r\n". print_r($ElementsPayment,true));

The other point is do you have contact with **Wechat Payment support** ? Or maybe you have in your merchant account a dashboard where you can see **communication between your website and payment servers** ?...

And finally, when we develop new payment plugin, we use most often the provided official libs from payment support, after having obviously a little adapted.
Hope this will help you.

Regards

Last edit: 9 years 1 week ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

The following user(s) said Thank You: [iaiai](/forum/user/50720-iaiai "View iaiai's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTEyMjUtd2VjaGF0LXBheW1lbnQtYXBpLWRvY3VtZW50LWVuLXZlcnNpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[iaiai](/forum/user/50720-iaiai "View iaiai's Profile")**
- [![iaiai's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/50720-iaiai "View iaiai's Profile") Topic Author
- [ Offline](/forum/user/50720-iaiai)

Less More

- Posts: 12
- Thank you received: 2
-
-

8 years 11 months ago [\#282298](#282298) by [iaiai](/forum/user/50720-iaiai "View iaiai's Profile")  Replied by *[iaiai](/forum/user/50720-iaiai "View iaiai's Profile")* on topic *[Wechat Payment API Document - EN version](/forum/29-payment-methods/891225-wechat-payment-api-document-en-version#282298 "-- HikaShop version -- : 3 -- Joomla version -- : 3.6.5  hi,  I have found the whole wechat payment api document for you.  1-4 for WEB payment.  Hope this helps.")*

Hi,

Now it works well both in Jsapi and Native type.

If anyone need wechatpay, Pls give me your email.

![:cheer:](/media/kunena/emoticons/2.png ":cheer:")

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile"), [zlgtz](/forum/user/57913-zlgtz "View zlgtz's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTEyMjUtd2VjaGF0LXBheW1lbnQtYXBpLWRvY3VtZW50LWVuLXZlcnNpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bluetooth](/forum/user/9052-bluetooth "View bluetooth's Profile")**
- [![bluetooth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/9052-bluetooth "View bluetooth's Profile")
- [ Offline](/forum/user/9052-bluetooth)

Less More

- Posts: 94
- Thank you received: 3
-
-

7 years 10 months ago [\#301689](#301689) by [bluetooth](/forum/user/9052-bluetooth "View bluetooth's Profile")  Replied by *[bluetooth](/forum/user/9052-bluetooth "View bluetooth's Profile")* on topic *[Wechat Payment API Document - EN version](/forum/29-payment-methods/891225-wechat-payment-api-document-en-version#301689 "-- HikaShop version -- : 3 -- Joomla version -- : 3.6.5  hi,  I have found the whole wechat payment api document for you.  1-4 for WEB payment.  Hope this helps.")*

> iaiai wrote: Hi,
>
> Now it works well both in Jsapi and Native type.
>
> If anyone need wechatpay, Pls give me your email.
>
> ![:cheer:](/media/kunena/emoticons/2.png ":cheer:")

Hi Sir. Could You give me a try About wechat payment plugin?My email is L0530@163.com. Many thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84OTEyMjUtd2VjaGF0LXBheW1lbnQtYXBpLWRvY3VtZW50LWVuLXZlcnNpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.060 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
