简体   繁体   English

通过solidus_stripe gem在create_intent上出现404

[英]404 on create_intent via solidus_stripe gem

Trying to integrate v3 intents, followed the readme but i keep getting thoses errors on js side:尝试集成 v3 意图,遵循自述文件,但我在 js 方面不断收到这些错误:

Feature Policy: Skipping unsupported feature name “payment”. v3:1:78187
Feature Policy: Skipping unsupported feature name “payment”. v3:1:78325
Feature Policy: Skipping unsupported feature name “payment”. v3:1:178554

and when i submit the test card informations:当我提交测试卡信息时:

POSThttps://_my_web_site_url.com/stripe/create_intent [HTTP/1.1 404 Not Found 897ms]

I keep searching for what kind of integration error i could've done but nothing, i have the feeling it lack a memeber of the posting url all mentions in stripe's doc are specifying a version in them.我一直在寻找我可以做什么样的集成错误,但什么也没做,我觉得它缺少发布 url 的成员,stripe 的文档中提到的所有内容都在其中指定了一个版本。

i'am running我在跑步

rails 5.2.6 on ruby 2.7 with:
solidus (2.10.5)
solidus_api (= 2.10.5)
solidus_backend (= 2.10.5)
solidus_core (= 2.10.5)
solidus_frontend (= 2.10.5)
solidus_sample (= 2.10.5)
solidus_api (2.10.5)
solidus_stripe (4.2.0)


config.static_model_preferences.add(
Spree::PaymentMethod::StripeCreditCard,
'stripe_env_credentials',
secret_key:'sk_test_aksdhflkajsgdflkuasgdf',
publishable_key: 'pk_test_kjhga;lihglkashglasd',
stripe_country: 'FR',
v3_elements: false,
v3_intents: true,
)

And the stripe static conf has been selected in the backend's payment page.并且在后台的支付页面中选择了条带 static conf。

A rails route show the available urls, but not available to js nor by direct typing in url bar. rails route 显示可用的 url,但不适用于 js,也不能直接在 url 栏中输入。

THanks in advance for reading / helping.提前感谢您的阅读/帮助。

i've posted an issue to the gem's repo.我已经向 gem 的 repo 发布了一个问题。

To make it works i had to add routes in my main app's route.rb:为了使它工作,我必须在我的主应用程序的 route.rb 中添加路由:

post '/stripe/confirm_payment', to: 'stripe#confirm_payment'

# payment intents routes: post '/stripe/create_intent', to: 'solidus_stripe/intents#create_intent' post '/stripe/create_payment', to: 'solidus_stripe/intents#create_payment' # payment intents routes: post '/stripe/create_intent', to: 'solidus_stripe/intents#create_intent' post '/stripe/create_payment', to: 'solidus_stripe/intents#create_payment'

# payment request routes: post '/stripe/shipping_rates', to: 'solidus_stripe/payment_request#shipping_rates' post '/stripe/update_order', to: 'solidus_stripe/payment_request#update_order' # payment request routes: post '/stripe/shipping_rates', to: 'solidus_stripe/payment_request#shipping_rates' post '/stripe/update_order', to: 'solidus_stripe/payment_request#update_order'

would not recommend this gem.不会推荐这颗宝石。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM