Paypal script for installment purchase product

hi,

I have implemented the script for managing product installments on shopify however now in order for everything to work I would have to extrapolate the code that shows the price of each product.

1 - paypal code (script)

<script
    src="https://www.paypal.com/sdk/js?client-id=TOKEN_PAYPAL_CODE&components=messages"
    data-namespace="PayPalSDK">
</script>

2- banner code shown on each product detail page (paypal code)

<div
    data-pp-message
    data-pp-style-layout="text"
    data-pp-style-logo-type="inline"
    data-pp-style-text-color="black"
    data-pp-amount="ENTER_VALUE_HERE">
</div>

Update the value of data-pp-amount to allow us to dynamically show the most relevant banner to your customers. For example, on a page with an 88.99 EUR product, update the code with data-pp-amount=88.99.

tank you

Andrea

Hello everyone, by coding a bit, I found a solution that is 99.999999% compatible and working.

If you want to implement PayPal’s installment system on your Shopify website follow the following.

a) Option one is to paste the code that allows you to communicate with shopify and return a value of the products selected and placed in the cart.

solution:

data-pp-amount="{{ cart.total_price | money_without_currency | remove: "," | divided_by: 100 }}

complete solution:

<div
    data-pp-message
    data-pp-style-layout="text"
    data-pp-style-logo-type="inline"
    data-pp-style-text-color="black"
    data-pp-amount="**{{ cart.total_price | money_without_currency | remove: ";" | divided_by: 100.00 }}**">
</div>

thank you

Andrea