aboutsummaryrefslogtreecommitdiff
path: root/client.go
AgeCommit message (Collapse)Author
2025-07-12all: replace module share with pakakeh.goShulhan
The share module has been migrated and renamed to git.sr.ht/~shulhan/pakakeh.go.
2025-07-12all: add option Timeout to ClientShulhan
The Timeout option affect how long the client wait for connect and waiting for response.
2023-08-15all: export all of status codesShulhan
While at it, change the code prefix from ResCodeXXX to StatusCodeXXX so we can add another error codes later.
2023-07-12client/merchant_inquiry: return 4xx error from duitkuyogi sofiharja
By returning 4xx error, client can return the correct error given by duitku
2023-07-06client: return response from duitku even if the code is not success (00)yogi sofiharja
It allow the client to show error that comes from duitku
2023-03-23all: replace golangci-lint with reviveShulhan
The golangci-lint is become unusable when building with Go tip and their default run does not return any results. This changes fix all code and comments reported by revive.
2023-03-17all: change the MerchantTxStatus parameter to structShulhan
The idea is to allow the caller to know the Signature of request after call to MerchantTxStatus and possibly log the whole request. While at it, we change the method name to MerchantPaymentStatus and the type from transactionStatus to PaymentStatus, and from TxStatusResponse to PaymentStatusResponse.
2023-03-09all: export the CallbackUrl, ReturnUrl, and Signature in MerchantInquiryShulhan
This is to allow the MerchantInquiry API to be more customize able instead of fixed, using specific merchant configuration. While at it change the MerchantInquiry method parameter to pointer, because to allow the caller receive filled Signature for audit.
2023-02-01all: implement API to check merchant transaction statusShulhan
The MerchantTxStatus method check the payment status by its orderID and payment method. Reference: https://docs.duitku.com/api/en/#check-transaction
2023-02-01all: implement API for Merchant InquiryShulhan
The MerchantInquiry API request payment to the Duitku system (via virtual account numbers, QRIS, e-wallet, and so on). Ref: https://docs.duitku.com/api/en/#request-transaction
2023-01-31all: implement API to get active payment method for merchantShulhan
The MerchantPaymentMethod method return list of payment methods enabled by merchant (your project).
2023-01-31all: add prefix Disburse to UserID, Email, and ApiKey in ClientOptionsShulhan
This is to differentiate options between Merchant and Disbursement.
2023-01-20all: update comment on Client ListBankShulhan
2023-01-20all: set DisburseID after successful RtolTransferShulhan
The actual response from Server does not return "disburseId", so we set it in RtolTransfer to prevent 0 value.
2023-01-20all: implement client API for InquiryStatusShulhan
The InquiryStatus get the status of previous Transfer. Ref: https://docs.duitku.com/disbursement/en/#inquiry-status
2022-11-30all: change the parameter of ClearingTransfer and RtolTransferShulhan
Instead of using request and response from inquiry, pass the actual Transfer type. This is to minimize confusion and to allow the caller to log the request on their side.
2022-11-30all: do not check for response Code on transferShulhan
As long as the response body is valid, return it to caller and let them check the response code manually. This is to allow user to log the request and full response.
2022-11-30all: add method Options in ClientShulhan
The Options method return the current client configuration.
2022-11-18all: export types RtolTransfer, ClearingTransfer and method SignShulhan
The idea is to allow testing the client from other module without using the provided APIs.
2022-11-15all: move the "/webapi/api" prefix from server URL to pathsShulhan
Instead of declaring the fixed prefix "/webapi/api" in the server URL, define it in the path itself so the server URL can be cleanly mock up.
2022-11-10all: change the inquiry and transfer parameter to pointerShulhan
Since the call to inquiry/transfer modify the parameter fields, we need to pass it as pointer so the caller can inspect or log the request values.
2022-11-07all: update comments format and remove loggingShulhan
2022-11-07all: implement type for Clearing callbackShulhan
The ClearingCallbackResponse contains fields that must be set in order to response from ClearingTransfer callback.
2022-11-07all: implement client API for Clearing TransferShulhan
The ClearingTransfer method do the clearing transfer using request and response from Clearing Inquiry.
2022-11-07all: changes the UserID in ClientOptions from string to int64Shulhan
The type in request is always be an int.
2022-11-07all: implement client API for Clearing InquiryShulhan
The ClearingInquiry method is used to initiate the transfer for Clearing using LLG, RTGS, H2H, or BI-FAST.
2022-11-07all: remove prefix Disbursement from Client methodsShulhan
Since most methods are call to disbursement methods, adding Disbursement in the method names not only make it longer but sligtly redundant.
2022-11-04all: export the request and response typesShulhan
This is to make documentation for the type that embed those types more clear.
2022-11-04all: implement API to do online transferShulhan
The RtolTransfer do the actual transfer to customer's bank account using the request and response from RtolInquiry.
2022-11-04all: implement API for online transfer inquiryShulhan
The RtolInquiry method get the information of the name of the account owner of the transfer destination. After getting this information, customers can determine whether the purpose of such a transfer is in accordance with the intended or not. If appropriate, the customer can proceed to the transfer process. Ref: https://docs.duitku.com/disbursement/en/#transfer-online
2022-10-31all: realign all structShulhan
This is to minimize the memory usage. In the response struct we remove unused Data field.
2022-10-31all: implement HTTP API checkBalance for disbursementShulhan
The DisbursementCheckBalance return the current and effective user's balance.
2022-10-26all: export the HTTP pathShulhan
This is to make the consumer of the module able to mock the endpoint using the known path.
2022-10-19duitku: library and HTTP client for duitku.comShulhan
Currently, the client provide API for fetching list of banks for disbursement. See https://docs.duitku.com/ for reference.