Why has my PayPal payment script stopped working on Shopify?

Hello, we are using this additional script for PayPal payments, it used to work but now it is not, nothing has been changed on our side.

We use this script because our local currency is not supported by PayPal and this converts the order total to a supported currency; when the customer selects PayPal as a payment gateway, the script shows a PayPal button in the Thank You page which takes the customer to PayPal and make the payment.

This is the script:

{% for transaction in order.transactions %}
  {% if transaction.gateway =="PayPal"%}

<br>
<br>

<b>Pay now by pressing this PayPal button.</b> <br><br>

<a href ="https://www.paypal.com/cgi-bin/webscr?business=xxxxxx@xxxx.xx.xx&cmd=_xclick&currency_code=USD&amount={{  total_price | money_without_currency |remove: ','  | divided_by:55 | round: 2}}&item_name=Order{{order_number}}"><img src="https://cdn.shopify.com/s/files/1/1481/4888/files/paypal2.gif?6361708077302677130" /></a>

 {% endif %}

{% endfor %}

We have been using this script for years and now it’s not working. Did something change in Shopify’s end?

We appreciate any help.

Thank you.

Hello @Amagadan , I am also facing a similar issue with the Checkout order status page “Additional Script” and it’s still unanswered. Did you find any solution for the above issue?

Note: I have noticed the

element is not available randomly when the order thank you page is loaded.

Thanks in advance.