Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Tony Kiernan 278 posts 341 karma points
    Jul 20, 2011 @ 10:38
    Tony Kiernan
    0

    Paypal emails

    I'm testing a site in the Paypal sandbox.  The Test Emails section is showing me this for the payment receipt:

    Hello Test User,
    ...
    
    -----------------------------------
    Purchase Details
    -----------------------------------
    
    Description:Sum
    Unit price:13.20 GBP
    Qty:1
    Amount:£13.20 GBP
    
    Subtotal: £13.20 GBP
    
    Total: 13.20 GBP
    
    Payment: 13.20 GBP
    Payment sent to: .......

    That 'Description' is not what was purchased. Is there a setting I have missed?

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jul 28, 2011 @ 17:23
    Søren Spelling Lund
    0

    Hi Tony,

    It's working the way it's supposed to. The reason it's like this is that PayPal will get in there and calculate taxes and other fields automatically, which will give the wrong amounts so we just lump everything together in a single field instead of specifying everything, which gives uCommerce total control over the amounts.

    Basically we're not huge fans of PayPal post-processing amounts that show up in the uCommerce records.

    Hope this helps.

  • Mikhail Merkuriev 1 post 21 karma points
    Feb 26, 2012 @ 19:10
    Mikhail Merkuriev
    0

    Hi Soren,

    I have the same issue. I need to track all sales in PayPal as well and the detailed PayPal invoice.

    How can I change current request to a detailed one? Is it possible to override current request generation method and how?

    I would write my own request generation.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Mar 05, 2012 @ 10:09
    Søren Spelling Lund
    0

    You can override the RenderPage method of the PayPalPaymentMethodService class. It's responsible for generating the information sent to PayPal.

  • xrisdoc 54 posts 102 karma points
    Nov 23, 2012 @ 13:42
    xrisdoc
    0

    Hello,

    How would you go about overriding the RenderPage method of the PayPalPaymentMethodService class? 

    I only need to change the value of the "item_name_1" that is being posted to PayPal, from "Sum" to "Something more descriptive". 

    I have tried to follow other tutorials that I have found, but these mainly focus on implementing whole new custom payments. I don't want to be implementing a whole new Payment Provider just to change a bit of text, if I can help it.

    Thanks

  • Søren Spelling Lund 1797 posts 2786 karma points
    Nov 27, 2012 @ 23:04
    Søren Spelling Lund
    0

    You can inherit the method called "GetParameters" on the class "PayPalWebSitePaymentsStandardPageBuilder".

    It returns a dictionary with the fields sent to PayPal. Among them is the "item_name_1", which you can override.

    Once that's done add your custom class to "Custom.config" found in "/umbraco/ucommerce/configuration" using the id "PayPalWebsitePaymentsStandardPageBuilder". That will make uCommerce use your implementation instead of the default one.

    Here's an example of what you need to add to Custom.config:

    <component id="PayPalWebsitePaymentsStandardPageBuilder" 
    service="UCommerce.Transactions.Payments.PayPal.PayPalWebsitePaymentsStandardPageBuilder, UCommerce.Transactions.Payments"
    type="MyPageBuilders.MyPayPalWebsitePaymentsStandardPageBuilder, MyCustomDLL" />

     

     

     

  • Deano 11 posts 31 karma points
    Dec 13, 2012 @ 12:01
    Deano
    0

    Soren,

    can you please supply me with a link to the API documentation for this class to assist in building this override.

    (PayPalWebSitePaymentsStandardPageBuilder)

     

    I cannot find it...see below link?

    http://www.ucommerce.dk/docs/

    I cannot extend PayPalWebSitePaymentsStandardPageBuilder and build because it does not contain a constructor with 0 params. Can you please assist with the posturl param. Where can i get this from to send through to PayPalWebSitePaymentsStandardPageBuilder?

     Also, i do not have a custom.config file. Can you please assit with wiring this into ucommerce.

    Thanks

    Dean

     

     

     

     

  • Søren Spelling Lund 1797 posts 2786 karma points
    Dec 17, 2012 @ 10:48
    Søren Spelling Lund
    0

    Hi Deano,

    Which version of uCommerce are you running? Custom.config was introduced with uCommerce 3.

    You can inherit the default page builder override the method GetParameters like so:

    public class MyPayPalPageBuilder : PayPalWebSitePaymentsStandardPageBuilder
    {
    public IDictionary<string, string> GetParameters()
    {
    var baseParameters = base.GetParameters();
    baseParameters.Add("myCutomKey", "myCustomValue");
    return baseParameters;
    }

    Hope this helps.

  • Deano 11 posts 31 karma points
    Dec 17, 2012 @ 10:51
    Deano
    0

    We're using 2.6 (i think)....The version before V3.

    We are also unable to upgrade to version 3 at this point. Is there a way of achieving the above without upgrading to version 3??

     

    Thanks

    Dean

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Jan 17, 2013 @ 16:40
    David Brendel
    0

    Hey,

    glad i found this topic. Have succesfully made a custom PayPalPageBuilder with uCommerce3.

    But i also have the same problem with uCommerce 2.6. Where can i change the PageBuilder there?

     

    Thanks David

  • Marc Love (uSkinned.net) 431 posts 1669 karma points
    Jan 30, 2013 @ 11:34
    Marc Love (uSkinned.net)
    0

    Hi Soren,

    I am trying to override PayPalWebSitePaymentsStandardPageBuilder

    The following line gives me an error:

    var baseParameters = base.GetParameters();

    GetParameters is expection PaymentRequest to be passed to it. Where do I get this from?

    Cheers,

    Marc

     

  • Joe Morrison 20 posts 80 karma points
    Feb 14, 2013 @ 16:05
    Joe Morrison
    0
    /// <summary>
    /// Summary description for MyPayPalPageBuilder
    /// </summary>
    public class MyPayPalPageBuilder : PayPalWebSitePaymentsStandardPageBuilder
    {
        public IDictionary<string, string> GetParameters(PaymentRequest paymentRequest)
        {
            var baseParameters = base.GetParameters(paymentRequest);
            baseParameters.Add("item_name_1", "Order Name");
            return baseParameters;
        }   
    }

     

    I get the following error when trying to add in my custom values:

     

    UCommerce.Transactions.Payments.PayPal.PayPalWebSitePaymentsStandardPageBuilder' does not contain a constructor that takes 0 arguments

     

    Any ideas would be greatly appreciated.

     

    Thanks,

    J

  • Marc Love (uSkinned.net) 431 posts 1669 karma points
    Feb 18, 2013 @ 14:42
    Marc Love (uSkinned.net)
    0

    Hi Joe,

    Did you manage to figure this out? I have the same issue.

    Cheers,

    Marc

  • Morten Skjoldager 440 posts 1499 karma points
    Feb 18, 2013 @ 14:53
    Morten Skjoldager
    0

    Fixing the problem is exactly the same way as in 3.0 You would just have to register it in components.config instead of custom.config (v3).

    @Marc Love

    Where are you trying to call GetParamters from ? 

    The standard PayPalWebSitePaymentsStandardPageBuilder only uses GetParameters within BuildBody which has the paymentreuqest passed as a parameter. I'd advice you to use Jetbrain's DotPeek decompiler to take a look at the paymentmethod service and how it's build. Its free and effective when you have to override standard components within uCommerce.

  • Marc Love (uSkinned.net) 431 posts 1669 karma points
    Feb 18, 2013 @ 15:15
    Marc Love (uSkinned.net)
    0

    Thanks Morten, sorted

    public MyPayPalPageBuilder(CommerceConfigurationProvider configProvider) : base(configProvider) { }

     

  • Joe Morrison 20 posts 80 karma points
    Feb 18, 2013 @ 15:40
    Joe Morrison
    0

    Hey Marc, glad this is sorted. Alas I couldnt figure it out in time, so came up with an alternative solution, which was to change the notifyURL parameter in the paypal.config which would change the listener url from ProcessPayment.axd? to our own IPN listener.

    The IPN listener is basically a razor Macro that does various things based on the payment_complete and VERIFIED or INVALID response from paypal. Then using webmatrix.data, does some SQL on the fly to update order statuses (which also marks orders in uCommerce backend) and send out emails to customers based on this. The advantage here was that it allowed then for a lot of custom functions which don't come "out of the box".

     

    Thanks,

     

    Joe

  • Morten Skjoldager 440 posts 1499 karma points
    Feb 18, 2013 @ 15:47
    Morten Skjoldager
    0

    @Joe

    Sounds like a reasonable solution. Although have you considered integrating them in the uCommerce Pipeline instead? Sounds like alot of the functionallity your talking about could be placed inside those. Whenever a callback is processed, the postprocessing pipeline is executed. At least that is what happens if you use any of the default paymentproviders.

     

  • Joe Morrison 20 posts 80 karma points
    Feb 18, 2013 @ 15:57
    Joe Morrison
    0

    Hi Morten, yeh I took a look at it briefly via the documentation on the uCommerce webste, essentially time was up against it for the project and I had to do something that would work the way the company had indicated to the client, it was my first time integrating uCommerce with umbraco so was a lot of late nights and learning curves (for a Front End Developer). But when I have more time to play with it - that will be my first port of call. I really did enjoy the integration and learned a lot from the razor store demo, which I'd recommend to anyone coming into uCommere for the first time!

  • Morten Skjoldager 440 posts 1499 karma points
    Feb 18, 2013 @ 16:05
    Morten Skjoldager
    0

    Alrighty :) adding tasks to the pipeline is actually a piece of cake once you get the hang of it. They are only as complex as you make them yourself :) At least, hooking one up, would be the easy part.

Please Sign in or register to post replies

Write your reply to:

Draft