Pay Now Button not working - Upsell example - Post purchase app extension

Pay Now Button not working - Upsell example - Post purchase app extension

Yurith
Shopify Partner
10 0 0

Hi all,
I have been working on this tutorial.

I got to the last step where I can see the upsell product. Problem: When I press the 'Pay Now' button, the loading icon on the buttons appears and nothing happens.

Yurith_1-1666122205467.png


On the console. When I press the button, this appears:
Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON

Yurith_2-1666122302913.png

 


I have my server folder inside the main app folder - for the .env file, I created a development app on my developer store and added the credentials from there.

 

Yurith_3-1666122450735.pngYurith_4-1666122525997.png


But my main app is registered on my partner's account.

Yurith_5-1666122618140.png


Questions:


For my server folder:
    - Where is best to locate it?

    - Should I use the credentials of my app on my partner account? (I did not do it as I cannot get an admin access token, only the temporary one)

For making the Pay Now button:
     - Do you know what I am missing?

I am also running both: My server and my app locally when testing the app.

I hope you can lead me through the steps as I find the tutorial lacking some main but extremely simple steps that take so long to solve when you do not know where to set things.

Thanks for you help.
Yurith Rubio

 

 

Replies 0 (0)