Express checkout Paypal button on single product page

Hello,

I am trying to implement the Express checkout Paypal button on a single product page. For the moment I am using the dynamic checkout button which is working for all available payment options.

I managed so far to paste HTML code (generated by Paypal button manager) in

product-template.liquid

and button was visible on a single product page.

When I do testing, the button redirects me to PayPal but the price is not taken from Shopify, in other words, you get the blank form to introduce the amount which you want to pay by PayPal.

My question is did I miss something, and do I have to paste some additional PayPal script that can be found on their developer site or just I will have to write a custom script (javascript) that can resolve

this issue. When I make the Express PayPal button working, I will switch off the dynamic checkout button and leave only the Expres Check PayPal button on the single product page.

Hello,

This is updated how far i arrived.

I added a second custom Paypal button on my single product page in order to turn off the dynamic payment button for my users.

I successfully did that and the button works and payment in Paypal is received.

However, I have a problem which is that the order made by the customer is not registered in the admin panel dashboard (Shopify) so my logistic

can sees it too. My code in

product-template.liquid

goes like this

button code


                                                
                                                {% if section.settings.enable_payment_button %}
                                                    {{ form | payment_button }}
                                                 
                                                {% endif %}
                                            

                                        {% endform %}
                                         
                                          
                                            
                                        {% endform %}
                                         
                                       

and my javascript goes like this


Since that I am new to Shopify is there is an event or function which I should implement into existing javascript.