feat: Update payment processing and callback mechanisms
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m22s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m22s
- Refactor ActivateClubMembershipCommandHandler to use UserPackagePurchases instead of UserOrders for package activation. - Modify PlaceOrderCommandHandler to redirect payment callbacks to the front office. - Update ChargeDiscountWalletCommandHandler and ChargeMagicWalletCommandHandler to direct payment callbacks to the front office. - Remove PaymentCallbackController and integrate payment verification directly into DiscountOrderService and UserWalletService. - Add CustomerVerifyDiscountOrderPayment RPC to DiscountOrderService for verifying discount order payments. - Implement VerifyMagicCharge and VerifyDiscountCharge methods in UserWalletService for wallet charge verifications. - Update appsettings.json to use local URLs for development. - Remove appsettings.Development.json as it is no longer needed. - Comment out history tracking methods in ClubMembershipCycle and Package classes. - Update PackageService to automatically activate club membership after successful payment verification. - Adjust UserService to generate JWT tokens with user details.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>0.0.189</Version>
|
||||
<Version>0.0.190</Version>
|
||||
<DebugType>None</DebugType>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
||||
|
||||
@@ -54,6 +54,14 @@ service DiscountOrderContract
|
||||
get: "/GetDiscountSalesReport"
|
||||
};
|
||||
};
|
||||
|
||||
// Customer: Verify discount order payment after gateway callback
|
||||
rpc CustomerVerifyDiscountOrderPayment(CustomerVerifyDiscountOrderPaymentRequest) returns (CustomerVerifyDiscountOrderPaymentResponse){
|
||||
option (google.api.http) = {
|
||||
post: "/CustomerVerifyDiscountOrderPayment"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
// Place Order (Initial Step - Create Order)
|
||||
@@ -309,3 +317,19 @@ message TopSellingProductDto
|
||||
int64 total_revenue = 5;
|
||||
int32 orders_count = 6;
|
||||
}
|
||||
|
||||
// ===== Customer Verify Discount Order Payment =====
|
||||
|
||||
message CustomerVerifyDiscountOrderPaymentRequest
|
||||
{
|
||||
int64 order_id = 1;
|
||||
string authority = 2;
|
||||
string status = 3;
|
||||
}
|
||||
|
||||
message CustomerVerifyDiscountOrderPaymentResponse
|
||||
{
|
||||
bool success = 1;
|
||||
string message = 2;
|
||||
int64 order_id = 3;
|
||||
}
|
||||
|
||||
@@ -89,6 +89,13 @@ service UserWalletContract
|
||||
};
|
||||
};
|
||||
|
||||
rpc VerifyMagicCharge(VerifyWalletChargeRequest) returns (VerifyWalletChargeResponse){
|
||||
option (google.api.http) = {
|
||||
post: "/Customer/VerifyMagicCharge"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
|
||||
// ============= Discount Wallet Methods =============
|
||||
|
||||
rpc InitiateDiscountCharge(InitiateDiscountChargeRequest) returns (InitiateDiscountChargeResponse){
|
||||
@@ -97,6 +104,12 @@ service UserWalletContract
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
rpc VerifyDiscountCharge(VerifyWalletChargeRequest) returns (VerifyWalletChargeResponse){
|
||||
option (google.api.http) = {
|
||||
post: "/Customer/VerifyDiscountCharge"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
}
|
||||
message CreateNewUserWalletRequest
|
||||
{
|
||||
@@ -267,4 +280,18 @@ message InitiateDiscountChargeResponse
|
||||
bool is_success = 1;
|
||||
string gateway_url = 2;
|
||||
string error_message = 3;
|
||||
}
|
||||
|
||||
// ============= Wallet Verify Messages =============
|
||||
|
||||
message VerifyWalletChargeRequest
|
||||
{
|
||||
string authority = 1;
|
||||
string status = 2;
|
||||
}
|
||||
|
||||
message VerifyWalletChargeResponse
|
||||
{
|
||||
bool success = 1;
|
||||
string message = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user