Is there example of ruby on rails project for taking a Card Payment with Web Payments SDK

I did read following article,”.
And I create rails project based on “GitHub - square/web-payments-quickstart: Quickstart for using Square's Web Payments SDK

In Production mode on heroku,
I’ve got missing-credentials error, on this line:
“payments = window.Square.payments(appId, locationId);”
error on console.log:
ApplicationIdEnvironmentMismatchError : Web Payments SDK was initialized with an application ID created in production however you are currently using sandbox

appID, locationId are collectly outputed on console log.
Yes, production values of them.

Please give me a hint.

I Solved!!

Add following source on top line of html.erb for web_payment_page.
<%case Rails.env%>
<%when ‘production’%>
<%= javascript_include_tag “” , ‘data-turbolinks-track’: ‘reload’ %>
<%when ‘development’%>
<%= javascript_include_tag “” , ‘data-turbolinks-track’: ‘reload’ %>

I made a example for taking a card payment with Square Payment SDK on Rials iin my Github public repositories.

I look forward to helping this community.

:wave: @yasunao_izawa, thanks you so much for sharing with the community! :slightly_smiling_face: