Update capture endpoint to match backend refactor
- Update capture URL from /api/capture/ to /api/payments/capture
This commit is contained in:
@@ -43,7 +43,7 @@ export const paymentService = {
|
|||||||
removeCardAlt: (id: number): Promise<ApiResponse<void>> =>
|
removeCardAlt: (id: number): Promise<ApiResponse<void>> =>
|
||||||
api.delete(`/payment/cards/remove/${id}`),
|
api.delete(`/payment/cards/remove/${id}`),
|
||||||
|
|
||||||
updatePaymentProfile: (id: number, data: { profile_id: string }): Promise<ApiResponse<void>> =>
|
updatePaymentProfile: (id: number, data: { auth_net_payment_profile_id: string }): Promise<ApiResponse<void>> =>
|
||||||
api.put(`/payment/card/update_payment_profile/${id}`, data),
|
api.put(`/payment/card/update_payment_profile/${id}`, data),
|
||||||
|
|
||||||
// Authorization & capture (Main API)
|
// Authorization & capture (Main API)
|
||||||
@@ -94,7 +94,7 @@ export const paymentService = {
|
|||||||
authorizeApi.post(`/api/charge/${customerId}`, data),
|
authorizeApi.post(`/api/charge/${customerId}`, data),
|
||||||
|
|
||||||
capture: (data: CaptureRequest): Promise<ApiResponse<AuthorizeNetTransactionResponse>> =>
|
capture: (data: CaptureRequest): Promise<ApiResponse<AuthorizeNetTransactionResponse>> =>
|
||||||
authorizeApi.post('/api/capture/', data),
|
authorizeApi.post('/api/payments/capture', data),
|
||||||
|
|
||||||
// Auto transaction endpoints
|
// Auto transaction endpoints
|
||||||
getAutoTransaction: (deliveryId: number): Promise<ApiResponse<AuthorizeNetTransactionResponse>> =>
|
getAutoTransaction: (deliveryId: number): Promise<ApiResponse<AuthorizeNetTransactionResponse>> =>
|
||||||
|
|||||||
Reference in New Issue
Block a user