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.

  • Sheppe Pharis 43 posts 139 karma points
    Jan 13, 2013 @ 22:13
    Sheppe Pharis
    0

    Object reference not set to instance of object

    My saga with trying to get uCommerce 4 to properly integrate with my custom payment provider on Umbraco 4.10.1 continues.

    I got my payment provider to show up in the dropdown list in the configuration section. See http://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/37353-Integrating-custom-payment-provider-into-webconfig for more info on that, as I suspect how I've set it up in the payments.config file is where the problem lies.

    I've built out my store using the Razor store example, and everything is working except for the actual processing of the payment. When I try to create a payment, this error is thrown:

    umbracoMacro   Error Loading Razor Script (file: uCommerce Payment) Object reference not set to an instance of an object.    at UCommerce.Transactions.TransactionLibraryInternal.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting)
      at Castle.Proxies.TransactionLibraryInternalProxy.CreatePayment_callback(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting)
      at Castle.Proxies.Invocations.TransactionLibraryInternal_CreatePayment.InvokeMethodOnTarget()
      at Castle.DynamicProxy.AbstractInvocation.Proceed()
      at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation)
      at Castle.DynamicProxy.AbstractInvocation.Proceed()
      at Castle.Proxies.TransactionLibraryInternalProxy.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting)
      at UCommerce.Api.TransactionLibrary.CreatePayment(Int32 paymentMethodId, Decimal amount, Boolean requestPayment, Boolean overwriteExisting)
      at ASP._Page_macroScripts_uCommerce_Payment_cshtml.Execute() in d:\Web Sites\rdco\macroScripts\uCommerce\Payment.cshtml:line 10
      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
      at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)
      at System.Web.WebPages.WebPage.ExecutePageHierarchy()
      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
      at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
      at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage) 0.126330025214466 0.026869
    umbracoMacro Loading IMacroEngine script [done] 0.12665633040236 0.000326
    umbracoMacro Error loading MacroEngine script (file: uCommerce/Payment.cshtml, Type: ''
    Object reference not set to an instance of an object.
      at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId) 0.126928072343374 0.000272

    It seems clear that it's not finding my class. The DLL is in the /bin folder, and that thread I linked to has the detail on how I've integrated it. 

    Thoughts? 

    Thanks,

    -Sheppe

  • Sheppe Pharis 43 posts 139 karma points
    Jan 14, 2013 @ 01:04
    Sheppe Pharis
    100

    I got past this error by adding an additional "qualifier" to the namespace of my component. I changed it from UCommercePayflowPro.Transaction to UCommercePayflowPro.Transactions.PayflowProPaymentService. I changed to my entry in the payments.config file to the following:

    <component id="PayFlow Pro" service="UCommerce.Transactions.Payments.IPaymentMethodService, UCommerce" type="UCommercePayflowPro.Transactions.PayflowProPaymentService, UCommercePayflowPro.Transactions" />

    And that corrected the original error. Of course now I'm getting another error, but I'll try to work through it before posting about it.
    -Sheppe
  • Søren Spelling Lund 1797 posts 2786 karma points
    Jan 14, 2013 @ 09:53
    Søren Spelling Lund
    0

    Thanks for posting the follow-up in the forum.

Please Sign in or register to post replies

Write your reply to:

Draft