Paypal invoice not giving the product name ? PLEASE HELP

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 15 años
By default paypal sends an invoice to Buyer and seller about the purchase, that invoice includes the product description and the total amount paid, is it possible to add more fields in that recipt by paypal ? i mean i want Manufacturer Part Number to be displayed on the paypal receipt, how it can be done ?  and currently in paypal invoice it only shows like this :
Unit price: $738.91 USD
Qty: 1
Amount: $738.91 USD

It doesn't give the name or description of the products orders ? If there are more than 1 products ordered then there is no way to find out what's in the order by looking at the paypal invoice, i know i can see from admin section but atleast paypal should also provide all the details, atleast name of the product

2) how to get the name of the product and the manufacturer part number in the invoice ?
Hace 15 años
anyone ?
Hace 13 años
Hi,

Check /Payment/Nop.Payment.PayPal/PayPalDirectPaymentProcessor.cs

See function:

protected void AuthorizeOrSale(PaymentInfo paymentInfo, Customer customer,
            Guid orderGuid, ProcessPaymentResult processPaymentResult, bool authorizeOnly)
        {

you need to uncommend this section:

ShoppingCart cart = IoC.Resolve<IShoppingCartService>().GetShoppingCartByCustomerSessionGuid(ShoppingCartTypeEnum.ShoppingCart, NopContext.Current.Session.CustomerSessionGuid);
            PaymentDetailsItemType[] cartItems = new PaymentDetailsItemType[cart.Count];
            for (int i = 0; i < cart.Count; i++)
            {
                ShoppingCartItem item = cart[i];
                cartItems[i] = new PaymentDetailsItemType()
                {
                    Name = item.ProductVariant.FullProductName,
                    Number = item.ProductVariant.ProductVariantId.ToString(),
                    Quantity = item.Quantity.ToString(),
                    Amount = new BasicAmountType()
                    {
                        currencyID = PaypalHelper.GetPaypalCurrency(IoC.Resolve<ICurrencyService>().PrimaryStoreCurrency),
                        Value = (item.Quantity * item.ProductVariant.Price).ToString("N", new CultureInfo("en-us"))
                    }
                };
            };
            details.PaymentDetails.PaymentDetailsItem = cartItems;


Also there are some misspeled properties:

GetShoppingCartByCustomerSessionGUID

needs to become

GetShoppingCartByCustomerSessionGuid

also

NopContext.Current.Session.CustomerSessionGUID

needs to be

NopContext.Current.Session.CustomerSessionGuid

Greetings
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.