37 lines
1.3 KiB
PHP
37 lines
1.3 KiB
PHP
<?php
|
|
|
|
// namespace App\Http\Controllers;
|
|
|
|
// use Illuminate\Http\Request;
|
|
|
|
// class pembayaranController extends Controller
|
|
// {
|
|
// public function index (request $request) {
|
|
|
|
// Set your Merchant Server Key
|
|
// \Midtrans\Config::$serverKey = 'SB-Mid-server-M9ZB8EiNLVtHsciFMUA4RSc8';
|
|
// Set to Development/Sandbox Environment (default). Set to true for Production Environment (accept real transaction).
|
|
// \Midtrans\Config::$isProduction = false;
|
|
// Set sanitization on (default)
|
|
// \Midtrans\Config::$isSanitized = true;
|
|
// Set 3DS transaction for credit card to true
|
|
// \Midtrans\Config::$is3ds = true;
|
|
|
|
// $params = array(
|
|
// 'transaction_details' => array(
|
|
// 'order_id' => rand(),
|
|
// 'gross_amount' => 10000,
|
|
// ),
|
|
// 'customer_details' => array(
|
|
// 'first_name' => 'nurul prima',
|
|
// 'last_name' => 'annisa',
|
|
// 'email' => 'npannisa23@example.com',
|
|
// 'phone' => '08111222333',
|
|
// ),
|
|
// );
|
|
|
|
// $snapToken = \Midtrans\Snap::getSnapToken($params);
|
|
// return view('user.transaction.pembeli.bayar-transaction', ['snap_token'=>$snapToken]);
|
|
// }
|
|
// }
|