x

Connect Stripe with Wechat Pay

Hello, 

I am having THE WORST time trying to include Wechat Pay service into my web page, through Stripe. I have no idea about API's. 

The only thing I need is a button that when is clicked redirects the user to a QR image autogenerated by Stripe.

I don't think it is that difficult, but since I have no clue about JS or API, I am just going crazy. Here's some things I've learnt while reading: 

https://stripe.com/docs/sources/wechat-pay       through this link they explain it all. 

- If I run the request (which is something like this): 

curl https://api.stripe.com/v1/sources \
  -u myAPIkey: \
  -d type=ach_credit_transfer \
  -d currency=usd \
  -d owner[email]="example@example.com"

or like this:

curl -X GET \ 'https://api.stripe.com/v1/sources?type=wechat&amount=1099&currency=cad&statement_descriptor=myTest' \ -H 'Authorization: Basic bXlVc2VybmFtZTo=' \ -H 'cache-control: no-cache'

I get a response (through a software that I've downloaded called Postman) In that response there's a link to a Wechat QR image that the costumer will read and it will redirect them to Wechat Pay so they can accept the payment.

With that being said. HOW do I transform all this into a button in Weebly, so my costumers can just click it and pay? 

Please if someone can just help me I will be forever grateful. THANK YOU

1,617 Views
Message 1 of 3
Report
2 REPLIES 2

Hey There!

You can edit your site with HTML, CSS, and Javascript; however, Weebly does not support building your site with server side languages, such as PHP or ASP. We also do not currently offer database access, and these options are not likely to become available in the near future. Very sorry for that!

I'd recommend reaching out to stripe or a 3rd party developer than can provide you with an HTML embed code that would be able to be integrated into the Weebly site.

1,500 Views
Message 2 of 3
Report

As a web developer, the HTML and JS are very simple we call it front end.  As the weekly support team mentioned that you also need a service we call it "back end" to handle the request to generate the QR code.  

I used the AWS lambda to handle the backend as severless, it is simple too and almost no cost. 

here is a real life sample for Wechat and Alipay which I worked on it

https://www.myenglishtutor.eu/pay

contact me if need any help https://troyyang.com

991 Views
Message 3 of 3
Report