midtrans_helper 0.0.1+2 midtrans_helper: ^0.0.1+2 copied to clipboard
Midtrans Easy To Add
see Example
await MidtransPay(
id: 'gopay',
url: 'https://api.sandbox.midtrans.com/v2/',
itemDetail : [{
"id": "a01",
"price": 6000,
"quantity": 1,
"name": "Apple"
}],
customerDetail : {
"first_name": "Budi",
"last_name": "Susanto",
"email": "budisusanto@example.com",
"phone": "+628123456789",
},
alamatPengiriman : {
"first_name": "Budi",
"last_name": "Susanto",
"email": "budisusanto@example.com",
"phone": "0812345678910",
"address": "Sudirman",
"city": "Jakarta",
"postal_code": "12190",
"country_code": "IDN"
},
serverKey: 'your server key',
detailTransaksi :{
"order_id": "CustOrder-110",
"gross_amount": 9000,
},
getStatus: (data,status){
// data response from midtrans
// status true / false
if(status){
// if success response 201
}
}
).send(context);