item description paypal

Tottos
Visitor
2 0 0

Hello so i have paypal checkout activated but i wanted to add visa code (externally) so when i did if someone buys i don't get notified in shopify orders i get notified in my payapl email but there is no description of item 

as you see in the picture i'm testing in sandbox mode on paypal.

here is the code i'm currently using in the description section i tried adding Product.title / item.product.title /

item_option.name i tried to add everything related to product name but it won't show in paypal description as in picture and this is only on visa payment since its external code.

i need some help either getting description on paypal or somehow linking visa with shopify to get notified in orders.

i just should add something in the description relating to product title but i can't find it i even tried Cart_main.items but didn't work as well
some help would be appreciated.

and please don't suggest payment gateways.

<!DOCTYPE html>

<head>
    <!-- Add meta tags for mobile and IE -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>

<body>
    <!-- Set up a container element for the button -->
    <div id="paypal-button-container"></div>

    <!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=Adv3rCG2gy4IrdD5Z0EhR9evmC9_2EpkXWqumB9JZh1yvEVHI2JwQoW2srQeF7m8i1D9Z6KovtYw4KQ5&currency=USD&intent=capture&enable-funding=venmo" data-sdk-integration-source="integrationbuilder"></script>


    <script>
        // Render the PayPal button into #paypal-button-container
        paypal.Buttons({

            // Set up the transaction
            createOrder: function(data, actions) {
                return actions.order.create({
                    purchase_units: [{
                        amount: {
                            value: {{ cart.total_price | divided_by:100.0 }}
                        },
                          description: "{{ product.title | handle }}"
                    }]
                });
            },

            // Finalize the transaction
            onApprove: function(data, actions) {
                return actions.order.capture().then(function(details) {
                    // Show a success message to the buyer
                    alert('Transaction completed by ' + details.payer.name.given_name + '!');
                });
            }


        }).render('#paypal-button-container');
    </script>
</body>


    


Screenshot_9.png

 

 

Reply 1 (1)
Tottos
Visitor
2 0 0

any help ?? 😞