Comments (17)
Check out the Troubleshooting page in the Wiki of this repo. You will want to enable test mode and debug. There are two places with info - one is the developer console of the browser - my guess based on your issue that this is where the info needed will show up. The other is found in the Status tab of WooCommerce admin - you can find the fastspring log - thats more to debug communication between FS and Woo however. So turn test/log on, open the dev console of your browser and look at the messages. Do a fresh reload of the cart and paste the entire log here or in a gist.
from woocommerce-fastspring-payment-gateway.
I have set up perfectly everything. double-check it. But I am getting the error
[FastSpring API] (!) Error: Error received: – 400 – "payload-invalid"
Please watch this video: https://www.loom.com/share/ebf44b6dcfed42d3b50dceba734d9a2d
www.msbacademy.com-1566412341936.log
from woocommerce-fastspring-payment-gateway.
In the log attached there is an error saying no access key. I see that you have it in your video but when I look at the source code of your site I see this:
<!-- HFCM by 99 Robots - Snippet # 1: Fastspring --> <script
--
| id="fsc-api"
| src="https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.0/fastspring-builder.min.js"
| type="text/javascript"
| data-storefront="msbacademy.onfastspring.com/popup-mystore"></script> <!-- /end HFCM by 99 Robots --> <!-- HFCM by 99 Robots - Snippet # 2: visitor-analytics.io --> <!-- VISA Tracking Code for https://www.msbacademy.com --> <script>(function (v, i, s, a
Did you add the FS snippet manually as well? This may be conflicting. The WP plugin adds that code - with the access key in it. I think you have two different FS code bits happening. Remove that snippet and try again.
from woocommerce-fastspring-payment-gateway.
yeah, another code was activated. now just remove it. but still its not working properly. please check the log file now
www.msbacademy.com-1566417218752.log
from woocommerce-fastspring-payment-gateway.
You need to whitelist your domain in FS. Here's the relevant error in your log:
Access to XMLHttpRequest at 'https://msbacademy.test.onfastspring.com/popup-mystore/builder' from origin 'https://www.msbacademy.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
From wiki docs: If you have opted to use the Popup Storefront method you will need to contact FastSpring support and ask them to whitelist your store domain.
from woocommerce-fastspring-payment-gateway.
already added my domain as whitelisted website. see the screenshot https://cl.ly/49cbc6
now, do I need to contact FS support?
from woocommerce-fastspring-payment-gateway.
It does look correct but that error indicates something is not right with that setup. Contact FS support and tell them you get this message:
Access to XMLHttpRequest at 'https://msbacademy.test.onfastspring.com/popup-mystore/builder' from origin 'https://www.msbacademy.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Yet your domain is whitelisted. Perhaps they need to reset something.
from woocommerce-fastspring-payment-gateway.
got the reply from fastspring support. please check their reply https://cl.ly/eceea1
I want your solution badly......
from woocommerce-fastspring-payment-gateway.
Calling the method as they did does not imply CORS is working. The FS file is loaded on your server so of course you can run methods against it. What doesn't work is sending a POST call to https://msbacademy.test.onfastspring.com/popup-mystore/builder
from `https://www.msbacademy.com' which is where CORS needs to be setup for that to be allowed. Please have them double check - perhaps reload the whitelisted domain.
from woocommerce-fastspring-payment-gateway.
their last reply https://cl.ly/876ff2
what do you think about it? :(
from woocommerce-fastspring-payment-gateway.
Paste your snippet (I assume its the one from above comment) in a file and save that file as cors.html
and upload to the root directory of your site (where the wp-config.php file is). The file only needs to contain (to be safe use the one from your dashboard - this is the duplicate code that was on your site earlier which I assume is correct but lets be safe):
<script
id="fsc-api"
src="https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.0/fastspring-builder.min.js"
type="text/javascript"
data-storefront="msbacademy.onfastspring.com/popup-mystore">
</script>
Then open your browser console and call the URL https://www.msbacademy.com/cors.html and send me what the console says. If it says nothing then CORS is setup correctly - if, on the other hand, you see something like:
Access to XMLHttpRequest at 'https://msbacademy.onfastspring.com/popup-testfastspring/builder' from origin 'https://msbacademy.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Then that implies CORS is not setup correctly by FS. If that is the case, have them escalate the issue to a senior developer (explain that you just pasted the snippet in an html file and there is no WP involved).
from woocommerce-fastspring-payment-gateway.
I see in your logs that you have msbacademy.test
. There could be an issue where your domain is whitelisted for production and not test. Ensure you are using the same throughout - the plugin will add "test" for test mode but you'll want to ensure that this is also CORS safe so in your snippet do a test with msbacademy.onfastspring.com/popup-mystore
and another with msbacademy.test.onfastspring.com/popup-mystore
where it says data-storefront
. be sure to not cache your result between tests.
from woocommerce-fastspring-payment-gateway.
I have similar problem - regular payment works, but popup doesn't.
Everything is setup correctly. I can see access token included in code (I changed url and access key for privacy):
<script type="text/javascript" id="fsc-api" data-storefront="mysite.onfastspring.com" data-before-requests-callback="fastspringBeforeRequestHandler" data-access-key="here-is-access-key-from-settings-matching-the-one-provided-by-fastspring" data-debug="true" data-test="yes" data-version="1.2.2" data-data-callback="dataCallbackFunction" data-error-callback="errorCallback" data-popup-closed="fastspringPopupCloseHandler" src="https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.7.6/fastspring-builder.min.js?ver=5.4"></script>
And code for popup (got this form FS site):
<script id="fsc-api" src="https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.3/fastspring-builder.min.js" type="text/javascript" data-storefront="mysite.onfastspring.com/popup-mysite">
</script>
Domain is virtual localhost and it is whitelisted.
I get this error:
[FastSpring API] No access key found in payload.
[FastSpring API] (!) Error: Error received: 400 empty-session
WooCommerce status log is empty and test and logging is enabled in plugin settings...
from woocommerce-fastspring-payment-gateway.
@kskrlinnorth2 I created a new issue - let's chat there. #21
from woocommerce-fastspring-payment-gateway.
I have set up perfectly everything. double-check it. But I am getting the error [FastSpring API] (!) Error: Error received: – 400 – "payload-invalid"
Please watch this video: https://www.loom.com/share/ebf44b6dcfed42d3b50dceba734d9a2d
How did you fixed that?
from woocommerce-fastspring-payment-gateway.
@Manika-Kumari it sounds like an invalid access key or a conflict if you have manually added a snippet as OP did. Please open a new issue and provide the log and url as originally asked in this thread and I can take a look.
from woocommerce-fastspring-payment-gateway.
@Manika-Kumari it sounds like an invalid access key or a conflict if you have manually added a snippet as OP did. Please open a new issue and provide the log and url as originally asked in this thread and I can take a look.
Thanks for getting in touch, I have created a separate ticket, here is the link:
#32
from woocommerce-fastspring-payment-gateway.
Related Issues (20)
- Error if product is a woo-commerce variable product HOT 2
- how to send license key in email
- Error Message HOT 3
- API is not working => woocommerce "order cancelled" HOT 16
- Error processing checkout. Please try again. HOT 1
- Regular payment works, but popup doesn't. HOT 3
- Shipping price not working on Fastspring HOT 4
- New Product Tax Categories HOT 1
- Integration with WooCommerce subscriptions HOT 18
- Does this plugin still work? HOT 1
- Fatal Error HOT 1
- Adding subscription products to cart works, checkout does not HOT 5
- 'expired' error
- Subscription renewal orders are on-hold HOT 5
- WebHooks are failing to complete some order but not all. HOT 9
- A lot of fields from checkout dissapear HOT 4
- Storefront popup opens and close immediately. HOT 7
- Compatibility with Woocommerce Subscriptions? HOT 5
- Not working with Woocommerce Versión 8.3.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from woocommerce-fastspring-payment-gateway.