Code Monkey home page Code Monkey logo

bersamabisaid's Introduction

Bersamabisa App (bersamabisaid)

Bersamabisa main web

API Specs

  • endpoint prefix: api/
  • seluruh response body pada api specs akan berada di data pada template berikut
    {
      "success": boolean,
      "message": string,
      "data": {
        // data body...
      },
    }

Membuat redirect url transaksi ke snap

api untuk membuat url redirect transaksi menggunakan midtrans snap integration, sebelum diberikan redirect url data transaksi/donasi akan direkam kedalam firestore terlebih dahulu, untuk data yang direkam didefinisikan terlebih dahulu menggunakan interface typescript.

  • endpoint: /midtrans/create-transaction
  • method: POST
  • request header:
    • content-type: application/json
    • accept: application/json
  • request body: typescript interface pada shared/types/backendRequest
  • response body:
    {
      "redirect_url": string,
    }

Snap Redirect URL

redirect url setelah melakukan transaksi via midtrans snap. berdasarkan dokumentasi dari midtrans kita akan mendapat query berupa order_id, status_code dan transaction_status. nantinya order_id akan digunakan untuk mengambil redirect url dari firestore pada collection, kemudian redirect ke alamat tersebut.

  • endpoint: /midtrans/payment-finish
  • method: POST
  • request header:
    • content-type: application/json
    • accept: application/json
  • request query: typescript interface pada shared/types/backendRequest
  • response: redirect ke halaman setelah transaksi

Midtrans webhook

Url untuk menerima notifikasi transaksi dari midtrans.

Webhook ini akan memverikasi signature_key yang dikirim oleh midtrans kemudian mengupdate data yang ada pada firestore

dokumentasi: https://docs.midtrans.com/en/after-payment/http-notification

  • endpoint: /midtrans/payment-webhook
  • method: POST
  • request header:
    • content-type: application/json
  • request body:
    // below is required only, for full data see https://api-docs.midtrans.com/#get-transaction-status
    {
      "signature_key": string,
      "transaction_id": string,
      "order_id": string,
      "transaction_status": string,
      "fraud_status": string,
    }
    // for possible data see https://docs.midtrans.com/en/after-payment/http-notification?id=sample-in-curl
  • response: HTTP status code only

Get Transaction Status

Hanya perantara Get Transaction Status Core API midtrans

Install the dependencies

npm install

Start the app in development mode (hot-code reloading, error reporting, etc.)

quasar dev

Lint the files

npm run lint

Build the app for production

quasar build

Customize the configuration

See Configuring quasar.conf.js.

bersamabisaid's People

Contributors

anhzf avatar abyanzhafran avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.