Skip to content
Contoh Implementasi Midtrans di web donasi sederhana menggunakan Laravel
PHP HTML Vue
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app + add email validation Jul 18, 2019
bootstrap
config + add donation form, midtrans snap pop up on submit form Oct 22, 2018
database
docs update readme.md Oct 25, 2018
public init Oct 18, 2018
resources + add email validation Jul 18, 2019
routes + add redirect to welcome on finish Oct 26, 2018
storage
tests init Oct 18, 2018
.DS_Store + add email validation Jul 18, 2019
.editorconfig
.env.example
.gitattributes
.gitignore init Oct 18, 2018
artisan init Oct 18, 2018
composer.json add veritrans php sdk Oct 18, 2018
composer.lock add veritrans php sdk Oct 18, 2018
package.json init Oct 18, 2018
phpunit.xml init Oct 18, 2018
readme.md update readme.md Oct 25, 2018
server.php init Oct 18, 2018
webpack.mix.js

readme.md

About

Ini adalah contoh implementasi Payment Gateway Midtrans di Laravel. Contoh kasus yang diambil adalah web donasi online, semua sistem/manajemen donasi yang ada disini dibuat sesederhana mungkin agar kita bisa lebih fokus untuk mepelajari cara kerja Payment Gateway Midtransnya.

Snap Midtrans Flow

Midtrans Payment Flow

  1. User performs the checkout operation
  2. Merchant server makes an api request to the snap backend to get the SNAP_TOKEN
  3. Snap backend responds to the api call with the SNAP_TOKEN
  4. Merchant server constructs the html page and sends it back to the browser
  5. User verifies the details and clicks the pay button. Merchant’s javascript code calls snap.pay(SNAP_TOKEN, options). User then fills up the payment details and clicks the confirm button.
  6. Snap JS sends the payment details to the snap backend
  7. Snap backend processes the details and responds with the charge status. Snap JS then calls the corresponding callback provided by the merchant’s javascript code.
  8. Snap backend notifies the merchant server about the charge status
You can’t perform that action at this time.