Open Closed

Problem with payment module #4388


User avatar
0
aroyal81 created

Hello, I have a question about payment module. We have added a new gateway provider, defined gateway constants in Domain.Shared. A new provider has appeared in the API, but when we try to create a payment (curl -kv -X 'POST' 'https://localhost:44314/api/payment/TestPay/start'), we get this error:

---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": { "ActivatorChain": "TestSolution.BtcPayments.BtcPaymentGateway" }, "validationErrors": null }

[18:15:15 ERR] An exception was thrown while activating TestSolution.BtcPayments.BtcPaymentGateway. Autofac.Core.DependencyResolutionException: An exception was thrown while activating TestSolution.BtcPayments.BtcPaymentGateway. ---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'TestSolution.BtcPayments.BtcPaymentGateway' can be invoked with the available services and parameters: Cannot resolve parameter 'TestSolution.BtcPayments.IPurchaseParameterListGenerator purchaseParameterListGenerator' of constructor 'Void .ctor(Volo.Payment.Requests.IPaymentRequestRepository, TestSolution.BtcPayments.IPurchaseParameterListGenerator, Microsoft.Extensions.Options.IOptions`1[TestSolution.BtcPayments.BtcPaymentOptions])'.

  • ABP Framework version: v6.0.1
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please share your code, eg BtcPaymentGateway, IPurchaseParameterListGenerator etc

  • User Avatar
    0
    aroyal81 created

    hi

    Please share your code, eg BtcPaymentGateway, IPurchaseParameterListGenerator etc

    BtcPaymentGateway:
    
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Volo.Abp.Autofac;
    using Volo.Abp.Modularity;
    
    // TestSolution.Domain.Shared\BtcPayments\BtcPaymentConsts.cs
    namespace TestSolution.BtcPayments
    {
        public static class BtcPaymentConsts
        {
            /// <summary>Value: "BtcPay"</summary>
            public const string GatewayName = "BtcPay";
            /// <summary>Value: "/Payment/BtcPay/PrePayment"</summary>
            public const string PrePaymentUrl = "/Payment/BtcPay/PrePayment";
            /// <summary>Value: "/Payment/BtcPay/PostPayment"</summary>
            public const string PostPaymentUrl = "/Payment/BtcPay/PostPayment";
    
            public static class ParameterNames
            {
                public const string PaymentRequestId = "PaymentRequestId";
                public const string Url = "url";
                public const string PayRefNo = "payrefno";
                public const string Ctrl = "ctrl";
            }
        }
    }
    

    About IPurchaseParameterListGenerator I assume that it is implemented in the private part of the abp.payments module but the source code of the module is not available in the framework license

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    About IPurchaseParameterListGenerator I assume that it is implemented in the private part of the abp.payments module but the source code of the module is not available in the framework license

    hi

    Please check the namespace of the injected IPurchaseParameterListGenerator service?

    Depends on the module that implements the interface.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 26, 2024, 06:07