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.

  • Gonçalo Assunção 39 posts 68 karma points
    Jan 19, 2015 @ 16:55
    Gonçalo Assunção
    0

    create a Dummy payment gateway for tests

    Hello guys!

    I'm starting my way around  as a professional web developer, and I need your help to achieve this goal.

    So I have a pretty simple umbraco/Ucommerce setup, with only 2 products.

    The process is the following:

    The user selects one of the two products -> is redirected to a page where he provides his billing details -> another page to provide payment details (credit card information) -> order confirmation page.

    So far, I am able to create the basket, and to edit the billing details (shipping is not required in this situation...), I'm having trouble in setting up the last step of the proccess. I was told to create some kind of dummy payment gateway, just for testing-wise. The user is not sent to the gateway. It's all taken care in the "background"..

    I have done some research, and from what I found, I don't need something "that" serious..
    After this, I will need pay-pal integration, etc..
    But for now, I just need to test the step of sending the product, payment and billing details, to some kind of dummy payment gateway, to finish the order process.

    Thank you in advance.
    Cheers from Portugal

  • Jesper Nielsen 141 posts 498 karma points
    Jan 20, 2015 @ 13:06
    Jesper Nielsen
    0

    Hello Goncalo,

    The default way of using payment gateways in uCommerce is by doing "customer redirect".

    This means that in the case of PayPal, the user enters credit card data on a page controlled by PayPal.

    If you yourself have a page where the customer enter credit card data, your site needs to be PCI compliant. This is not an easy thing, and it is not something you would normally do.

    So the recommended flow is:

    Your site> User enters billing details
    Your site> User selects the payment method

    <<User is redirected to PayPal, for example>>

    PayPal> User enters credit card data

    << PayPal validates the payment >>
    <<User is redirected back to a confirmation page on your site>>

    Your site> User sees a confirmation page.
    At this point the "checkout" pipeline is run.

    Re: dummy payment method service
    The payment method service "Default Payment Method Service" is precisely a dummy service.
    Once you get a PayPal account, you can set up the correct service and test the complete flow.

    Kind regards,
    Jesper

    PS: I would recommend that you use the "PayPal Express" payment method service. That way you do not need the complicated setup of a certificate, etc. for PayPal "proper".

  • Gonçalo Assunção 39 posts 68 karma points
    Jan 20, 2015 @ 17:48
    Gonçalo Assunção
    1

     

    Thank you Jesper!

    Yes, after posting the thread I have been doing some tests, and I successfully implemented the Paypal Express payment method.

    Now, after I confirm the payment, Paypal gives me the error message :

     

    Wrong amount! Expected 5,400.00, but was 5400.00

     

    In the order summary, the value shows "5,400.00", with the comma separating the thousands. But after I confirm the payment, it throws that exception.
    If I choose a product with a price lower thant 1,000.00, the paymant process completes without any error

  • Jesper Nielsen 141 posts 498 karma points
    Jan 22, 2015 @ 10:21
    Jesper Nielsen
    0

    Hello,

    This is a bug! :-(

    I have checked the code. It looks like we expect PayPal to return values with a thousands seperator. They do not.
    Maybe they did at one point?

    This will be fixed in the next release.

    Sorry for the inconvenience!

    And thank you very much for making us aware of this.

    Kind regards,
    Jesper 

  • Gonçalo Assunção 39 posts 68 karma points
    Jan 22, 2015 @ 15:59
    Gonçalo Assunção
    0

    Thanks again for your help Jesper!

    Is there any way to override the sending information process, and fix this, for now?

     

  • Morten Skjoldager 440 posts 1499 karma points
    Jan 23, 2015 @ 09:20
    Morten Skjoldager
    0

    Hi Goncalo,

    You can create a custom class and register that service yourself by using the following code: 

       public class ExtendedPayPalExpressPaymentMethodService : PayPalExpressPaymentMethodService
        {
            public ExtendedPayPalExpressPaymentMethodService(CommerceConfigurationProvider configProvider, IOrderService orderService, ILoggingService loggingService) : base(configProvider, orderService, loggingService)
            {
            }
    
            public override void ProcessCallback(Payment payment)
            {
                base.ProcessCallback(payment);
            }
    
            public override Payment RequestPayment(PaymentRequest paymentRequest)
            {
                return base.RequestPayment(paymentRequest);
            }
        }

    You also need to register it in configuration like so: 

    http://docs.ucommerce.net/ucommerce/v6/extending-ucommerce/register-a-component.html

    But we are in the process of redoing all payment gateways, and the release will be soon (hopefully next week). Maybe you can wait untill then, instead of writing a lot of custom code for something that will be fixed shortly?

    Best regards

    Morten

  • Chris Warnes 1 post 21 karma points
    Feb 18, 2015 @ 10:20
    Chris Warnes
    0

    Hi Morten,

    I'm experiencing exactly the same problem as Goncalo, is there any update on this? has there been a new release to fix this?

    I'm currently using umbraco 6 with ucommerce version 4.0.3.13287 it looks like ucommerce has moved on quite a bit since then?

     

    Thanks

  • Morten Skjoldager 440 posts 1499 karma points
    Feb 18, 2015 @ 14:29
    Morten Skjoldager
    0

    Hello Chris, 

    The fix is not release yes :-S We are in QA state so we expect it to be released this week (fingers crossed no impedements). It has been pushed quite some time now. 

Please Sign in or register to post replies

Write your reply to:

Draft