I am attempting to set up the WePay API to accept payments on my website via the Embedded Checkout, and I am running into some issues. The website is currently hosted on my local machine for testing and was created in Ruby on Rails (ruby 1.9.3p545 and Rails 3.2.13). I have my own shopping cart system in place, so when the user clicks on the “Checkout” button in the cart, I added the following code in the next controller action:
# set _use_stage to false for live environments
wepay = WePay.new(CLIENT_ID, CLIENT_SECRET, USE_STAGE)
# create the checkout
response = wepay.call('/checkout/create', ACCESS_TOKEN, {
:account_id => ACCOUNT_ID,
:amount => '24.95',
:short_description => 'Software',
:type => 'SERVICE'
})
I have done this because the page that loads after the user clicks on “Checkout” will show the WePay iframe, and I need to receive a checkout_id and a checkout_uri before showing the iframe. All of the variables in capital letters are defined in the config\environments\development.rb file and are based on their respective values from my WePay account. Upon clicking the “Checkout” button, I found that the call to /checkout/create fails. I receive the following error message:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
The WePay calls and objects are recognized since I have included the correct WePay gem in my Gemfile.
For reference, the official documentation for WePay's Embedded Checkout can be found here: https://www.wepay.com/developer/process_payments/iframe-checkout
EDIT:
I resolved the issue by following the instructions on the first answer at the following link: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed on WINDOWS