ce-midtrans

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2022 License: MIT Imports: 5 Imported by: 0

README

CloudEvent x Midtrans

CloudEvent adapter for Midtrans notifications.

Usage

Specify below environment variable.

Variable Description Example
K_SINK Sink URI. http://localhost:8080
SERVER_KEY Midtrans server key. SB-Mid-server-abcdefg
PORT Optional. Server port. Default 8080 8080
With Knative Eventing

Using ContainerSource (K_SINK is injected by ContainerSource).

apiVersion: sources.knative.dev/v1
kind: ContainerSource
metadata:
  name: <name>
spec:
  template:
    spec:
      containers:
        - image: ghcr.io/injustease/ce-midtrans
          name: ce-midtrans
          env:
            - name: SERVER_KEY
              valueFrom:
                secretKeyRef:
                  name: <secret-name>
                  key: <secret-key>
  sink:
    ref:
      apiVersion: <apiVersion>
      kind: <kind>
      name: <sink>

Using Knative serving

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: <name>
spec:
  template:
    spec:
      containers:
        - image: ghcr.io/injustease/ce-midtrans
          name: ce-midtrans
          env:
            - name: K_SINK
              value: <sink-uri>
            - name: SERVER_KEY
              valueFrom:
                secretKeyRef:
                  name: <secret-name>
                  key: <secret-key>

TODO

  • Payment Notification
  • Recurring Notification
  • Pay Account Notification
  • Test
  • Usage docs
  • Event Registry

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL