# הוספת בקרי נתיבים חדשים ותוספים לתקע ה-Discourse-subscriptions

**URL:** <https://meta.discourse.org/t/adding-new-controllers-and-routes-to-discourse-subscriptions-plugin/233704>\
**Category:** Development\
**Tags:** subscriptions\
**Created:** [22 ביולי,‏ 2022,‏ 10:44pm UTC](https://meta.discourse.org/t/adding-new-controllers-and-routes-to-discourse-subscriptions-plugin/233704 "2022-07-22T22:44:19Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![martin\_junior\_tchoup](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin_junior_tchoup/32/253858_2.png) [@martin\_junior\_tchoup](https://meta.discourse.org/u/martin_junior_tchoup)\
**Post date:** [22 ביולי,‏ 2022,‏ 10:44pm UTC](https://meta.discourse.org/t/adding-new-controllers-and-routes-to-discourse-subscriptions-plugin/233704/1 "2022-07-22T22:44:19Z")

</div>

Hello,  
I need help, I’m used to create fullstack applications but regarding ember and rails I’m still a beginner.

I want to add another payment method (bank transfer) to the discourse-subscriptions plugin. I already managed to create some new routes and add some features to it, but I’m struggling to add a new controller to the /discourse\_subscriptions/ controllers directory and make it work properly.

I want to set up a ruby controller that will act as a server and an ember template as my client the structure is as follows:

 ![structure](https://global.discourse-cdn.com/meta/original/4X/e/0/a/e0a70bf72faa18e84daa16da03d795512e73f225.png)

after creating the payment intent, the payment\_intent controller must return the necessary payment instructions to the client.  
more details: [Stripe - accept bank transfers](https://stripe.com/docs/payments/bank-transfers/accept-a-payment)

I have already created new pages by adding methods in the subscribe\_controller.rb file in the discourse\_subscriptions/ controller folder but when I try to create another controller (the server) it doesn’t work, it displays a 404 error, however in the ember inspector I see that the route actually exists (yes it is really confusing).

NB I created all the corresponding routes and their method types in the route.rb and subscriptions-route-map.js files.

I created a ruby **payment\_intent controller** and a corresponding route, **the controller should receive a post request from the client and generate a Stripe payment intent based on the data received with the post request, after the payment intent is created it should return the necessary payment instructions to the client**.  
On the client side, I have a small form with a submit button.

**I can’t establish the communication between this controller and the client page (server-client), the fact that there are two controllers( rails and ember) is a bit confusing**.

---

_[View the full topic](https://meta.discourse.org/t/adding-new-controllers-and-routes-to-discourse-subscriptions-plugin/233704)._
