#ykuro

1 messages · Page 1 of 1 (latest)

whole oasisBOT
vast echo
#

sure, it should be possible if you make the necessary modifications. What have you tried to debug so far? do you see 3 Prices being returned to your frontend?

stable arrow
#

do you see 3 Prices being returned to your frontend?

I was able to only see 2 Prices on the front end page. Also, I'm a junior engineer so I've barely tried debugging...

#

The contents of the ".env" file are irrelevant this case, right?

vast echo
#

not at this point i guess

#

your frontend should be making a request to your backend to retrieve the list of Prices to be displayed

#

what's the response?

stable arrow
#

what's the response?
Can you tell me how to check the response? I would like to share what you expect.

vast echo
stable arrow
#

Thank for sharing info, is this right?

vast echo
#

no, it's the one named config

stable arrow
vast echo
#

Check the response tab

stable arrow
#

{"publishableKey":"pk_test_51MRAwhKhZM6vApyY8gPUikER1zfc8j2kcAqWm4ESsu8Z4U8RodU8UbsaM4tdtTJ8WhmzytPvgU2QqLTHPfcLAODu00CAeWFTcF","prices":[{"active":true,"billing_scheme":"per_unit","created":1675823061,"currency":"usd","id":"price_1MZ3KbKhZM6vApyYFYrSiDlQ","livemode":false,"lookup_key":"sample_basic","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NJgiqSUEw0ZCjy"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":500,"unit_amount_decimal":500},{"active":true,"billing_scheme":"per_unit","created":1675823062,"currency":"usd","id":"price_1MZ3KcKhZM6vApyYh3mtYH9c","livemode":false,"lookup_key":"sample_premium","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NJgiYNUuwVW3Qm"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":1400,"unit_amount_decimal":1400}]}

There seems to be no information on the product I created

#

I created a file named seed_moribus.json and created a plan with the command "stripe fixtures seed_moribus.json".

vast echo
#

i don't understand how the fixture file is related to what you're doing?

stable arrow
#

I could not judge whether I had created the product correctly to start with so I shared with you how to create it.

#

for reference

#

The article I referred to used a fixture file when creating products.

vast echo
#

can you ensure you create a Price via the API with that lookup key?

stable arrow
vast echo
#

can you paste the Price id here?

stable arrow
#

sure

price_1MZU8sKhZM6vApyYDjGa9dLL

vast echo
#

okay, so if you refresh the page and check the response again, do you see the new price being returned?

stable arrow
#

{"publishableKey":"pk_test_51MRAwhKhZM6vApyY8gPUikER1zfc8j2kcAqWm4ESsu8Z4U8RodU8UbsaM4tdtTJ8WhmzytPvgU2QqLTHPfcLAODu00CAeWFTcF","prices":[{"active":true,"billing_scheme":"per_unit","created":1675823061,"currency":"usd","id":"price_1MZ3KbKhZM6vApyYFYrSiDlQ","livemode":false,"lookup_key":"sample_basic","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NJgiqSUEw0ZCjy"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":500,"unit_amount_decimal":500},{"active":true,"billing_scheme":"per_unit","created":1675823062,"currency":"usd","id":"price_1MZ3KcKhZM6vApyYh3mtYH9c","livemode":false,"lookup_key":"sample_premium","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NJgiYNUuwVW3Qm"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":1400,"unit_amount_decimal":1400}]}

I can not confirm the new price.

drowsy linden
#

what does 'confirming' the price mean?

stable arrow
#

New Price information was not returned.

drowsy linden
#

did you restart the .NET server so it's running the new code?

#

ah sorry, Java(screenshots reminded me Visual Studio)

stable arrow
#

Its ok. I only updated line 128 in Server.java (adding .addLookupKeys("sample_moribus") ), do I need to update anything else?

drowsy linden
#

if you did that, and you have a Price object on your account that has that lookup_key, it should be returned in the prices variable

stable arrow
#

Yes, I agree with you, but for some reason it is not returning information on new products. Do you have any advices?

drowsy linden
#

I'd add some code to debug it, so for example log what actual parameter you're passing directly from the running code and check your Stripe API logs

#

so I'm going to say again that you probably didn't save the file or restart the server after changing it.

stable arrow
#

so I'm going to say again that you probably didn't save the file or restart the server after changing it.

Sorry, I could not restart the server properly.
The third price information was returned and displayed correctly on the screen.

Thank you for your support, @vast echo @drowsy linden

#

{"publishableKey":"pk_test_51MRAwhKhZM6vApyY8gPUikER1zfc8j2kcAqWm4ESsu8Z4U8RodU8UbsaM4tdtTJ8WhmzytPvgU2QqLTHPfcLAODu00CAeWFTcF","prices":[{"active":true,"billing_scheme":"per_unit","created":1675823061,"currency":"usd","id":"price_1MZ3KbKhZM6vApyYFYrSiDlQ","livemode":false,"lookup_key":"sample_basic","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NJgiqSUEw0ZCjy"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":500,"unit_amount_decimal":500},{"active":true,"billing_scheme":"per_unit","created":1675926122,"currency":"usd","id":"price_1MZU8sKhZM6vApyYDjGa9dLL","livemode":false,"lookup_key":"sample_moribus","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NK8PcV3RlFB1C6"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":14000,"unit_amount_decimal":14000},{"active":true,"billing_scheme":"per_unit","created":1675823062,"currency":"usd","id":"price_1MZ3KcKhZM6vApyYh3mtYH9c","livemode":false,"lookup_key":"sample_premium","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NJgiYNUuwVW3Qm"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":1400,"unit_amount_decimal":1400}]}

stable arrow
#

If I want to add the price name in each price plan/box, what should I do? I would like to edit the information in each box in various ways for customers.

drowsy linden
#

I suggest you spend some time playing around with that and getting familiar with the code and trying things out , and let us know when you have some code that you've tried and need help with