Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
github.com/acgyiyo/payment_api_test
This Go application provides a simple payment processing system that allows users to register new payments, retrieve existing ones, and process refunds.
git clone https://github.com/acgyiyo/payment_api_test.git
cd project-directory
go mod tidy
go run cmd/main.go
By default, the application will listen on port 8082. You can customize this by setting the PORT environment variable.
Register a payment: Endpoint: /payments Method: POST Request body: A JSON object containing payment details (e.g., amount, currency, customer information) Retrieve a payment: Endpoint: /payments/{paymentId} Method: GET Path parameter: paymentId is the unique identifier of the payment Refund a payment: Endpoint: /payments/refund Method: POST
Example
curl --location 'localhost:8082/payment/refund' \
--header 'Content-Type: application/json' \
--data '{
"transaction_id": "txn-20241012204528+7"
}'
Database: The application uses a database to store payment information. You'll need to configure the database connection details in the configuration file and run doccker-compose file
internal\config\schemas\local.json
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.