Open Closed

Issue when using the payment module with the template module #7762


User avatar
0
taypv created

Check the docs before asking a question: https://abp.io/docs/latest/modules/payment

  • ABP Framework version: v8.2.0
  • UI Type: Blazor WASM / Blazor Server
  • Database System: EF Core (PostgreSQL)
    I encountered a 404 error and couldn't redirect to the page. Below is my project configuration. log

.Applicaiton Application.Contracts .Blazor .Domain .Domain.Shared .EntityFrameworkCore .HttpApi .Http.Client .Web appsettings.json

page demo with blazor

My goal is to create a module that integrates ABP's payment system and works like the ABP demo. Please assist me with this. Thank you.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

7 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    you can add these packages to Blazor.server project and add the module dependencies

    BTW, payment gateway page doesn't support Blazor webassembly UI

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    taypv created

    I have installed the packages as you instructed, and used the method below to call, but it resulted in a 400 error.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    please share the error logs

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    taypv created
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Redirection of the gateway selection page has to be a POST request. If you implement it as a GET request, you will get an error. You can use LocalRedirectPreserveMethod to keep the method as POST in the redirected request.

    https://abp.io/docs/latest/modules/payment#creating-one-time-payment

    You may consider using form to redirect, for example:

    <form method="post" data-ajaxForm="false" action="/Payment/GatewaySelection" id="Form">
    </form>
    
    .....
    
    await JSRuntime.InvokeVoidAsync("eval", "document.getElementById('Form').submit()");
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    taypv created

    I don't know how to implement it yet. Could you help me create a simple demo page? Thank you.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    I have provided the simple code here

    and i see there is an error message: Antiforgery token validation failed. The required antiforgery request token was not provided in either form field "__RequestVerificationToken" or header value "RequestVerificationToken". you can add __RequestVerificationToken to the form : https://learn.microsoft.com/en-us/aspnet/core/blazor/forms/?view=aspnetcore-8.0#input-components-and-forms

    <form method="post" data-ajaxForm="false" action="/Payment/GatewaySelection" id="Form">
        <AntiforgeryToken />
    </form>
    

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 09, 2026, 11:56
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.