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.

  • Bill Tyler 11 posts 41 karma points
    Jun 13, 2013 @ 21:33
    Bill Tyler
    0

    automatically take order from new to completed

    In my previous post you helped me get the amazon payments working.

    http://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/41595-Amazon-payment-provider-not-working

     

    Now I am wondering if there is a way to make an order go from new to completed automatically.  The amazon fps auth expires in 3 hours, so if an order comes in after hours we are not able to claim acquire it in the morning.

    What is the best way to handle this?

     

    On a side note, the Paypal provider automatically acquires.  Why is this handled differently?

    Thanks

  • Morten Skjoldager 440 posts 1499 karma points
    Jun 14, 2013 @ 10:02
    Morten Skjoldager
    0

    There's some legacy in it. Some times your'e not allowed to take the money before the order is shipped - if your'e selling Materials. However if they're immaterial like software, codes for something or whatever - you can acquired the money instant. If there's no way of acquireing payment instant with Amazon (check the documentation if you can flag off instant acquire at the link below)

    http://www.publicvoid.dk/SetupUCommerceToIncludeAmazonFPSAsAPaymentMethod.aspx

    Another way is to check the status of the payment on OrderConfirmation. If the payment has authorized status you can just use the OrderService to take it to completed. (The same as using the UI in the backend).

     

    Regards 

    Morten

  • Bill Tyler 11 posts 41 karma points
    Jun 14, 2013 @ 18:44
    Bill Tyler
    0

    Thanks Morten,

    I did follow the link you provided for my initial setup.  I have enabled Auto Acquire per the last section in the article.  

    Could you point me to more info on using the OrderService to take it to completed?

    Thanks

  • Bill Tyler 11 posts 41 karma points
    Jun 14, 2013 @ 18:47
    Bill Tyler
    0

    Also, I have discovered in the log that everywhere the PaymentProcessor.axd is called there is an exception immediatley after.  Is this and indicator that it is trying to acquire but there is an issue?

     

    2013-06-09 10:50:36,465 [71] INFO  umbraco.BusinessLogic.Log - [Thread 18] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: http://xxx.com:80/8/PaymentProcessor.axd?[removed]

    2013-06-09 10:50:36,465 [71] INFO  umbraco.BusinessLogic.Log - [Thread 18] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: Thread was being aborted.

    Void AbortInternal()

       at System.Threading.Thread.AbortInternal()

       at System.Threading.Thread.Abort(Object stateInfo)

       at System.Web.HttpResponse.AbortCurrentThread()

       at System.Web.HttpResponse.End()

       at System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent)

       at UCommerce.Transactions.Payments.Amazon.AmazonPaymentMethodService.ProcessCallback(Payment payment)

       at UCommerce.Transactions.Payments.PaymentProcessor.ProcessRequest(HttpContext context)

     

  • Morten Skjoldager 440 posts 1499 karma points
    Jun 17, 2013 @ 13:24
    Morten Skjoldager
    0

    Yeah, the following code could do it. Just place it on your orderconfirmation page if you want the order to be acquired right away.

    var orderService = ObjectFactory.Instance.Resolve(); 
    orderService.ChangeOrderStatus(order, OrderStatus.Get((int) OrderStatusCode.CompletedOrder));
  • Morten Skjoldager 440 posts 1499 karma points
    Jun 17, 2013 @ 13:28
    Morten Skjoldager
    0

    If there's an issue acquireing it would be revealed in the order audit. 

  • Bill Tyler 11 posts 41 karma points
    Jun 17, 2013 @ 16:47
    Bill Tyler
    0

    Thanks Morten, I think I am getting the picture.

    So in my callback confirmation page I add the code you listed to change the status and kickoff the acquisition.

    The strange thing about the exception I listed from the PaymentProcessor is that this is the page Amazon calls when the order is confirmed by the user.

    I assume this is preventing the ToCompleted pipeline from working or am I misunderstanding the process here?

     

    The only issues I have seen so far in the audit log are when the authorization expires and I try to move to completed, there is an "Internal Error" and it moves to the Requires Attention queue.

  • Morten Skjoldager 440 posts 1499 karma points
    Jun 21, 2013 @ 14:03
    Morten Skjoldager
    0

    Every payment provider redirects to PaymentProcessor which then is responsible for sending the customer to the desired URL of your's. ToCompleted is out of the box never called unless you do it (either from the backend or through the API).

    Okay. The last issue is natural i guess :) We cannot do anything about this. Howver doing the two lines of cods that i listed should do the trick. 

Please Sign in or register to post replies

Write your reply to:

Draft