fix payment gateway & add regenerate invoices button

This commit is contained in:
omair saleh
2021-11-21 23:30:59 +08:00
parent 419f3ca88b
commit 49c4362ba1
31 changed files with 344 additions and 127 deletions
-2
View File
@@ -56,5 +56,3 @@ BILLPLZ_BASE_URL="https://www.billplz-sandbox.com"
BILLPLZ_API_KEY="0fa4c710-761b-4a7a-a501-c2c2d02643d5"
BILLPLZ_X_SIGNATURE_KEY="S-pbNVthVRsvnPfZlgLwqqOg"
BILLPLZ_COLLECTION_ID="hev2wdjy"
BILLPLZ_REDIRECT_URL="http://localhost:9003/bookings/billplz"
BILLPLZ_CALLBACK_URL="localhost:9003/api/v1/billplz/callback"
@@ -61,6 +61,7 @@ abstract class AbstractControllerLogic
return $response;
} catch (ErrorException|GeneralExceptions $exception){
dd($exception);
return (new ApiResponseObject($this->getNotificationTitle().' failed', $exception->getMessage(),
$exception->getCode() ? $exception->getCode() : HttpStatus::SERVER_ERROR))->handler();
@@ -17,7 +17,6 @@ abstract class AbstractUpdateRecord
*/
public function handler(Model $model){
try{
if($model->save()){ return $model; }
} catch (QueryException $exception){
@@ -5,7 +5,7 @@ namespace App\Classes\General\Eloquent\Filters;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
class isPublished implements Filter
class IsPublished implements Filter
{
/**
@@ -14,7 +14,7 @@ class PaymentReference implements Filter
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('payment_reference', $value);
return $builder->where('payment_reference', '=', $value);
}
}
@@ -4,7 +4,7 @@ namespace App\Classes\Modules\Accounts\DataTransferObjects;
use App\Classes\General\Interfaces\DataTransferObject;
class FullnameObject implements DataTransferObject
class FullNameObject implements DataTransferObject
{
/** @var string */
private $name;
@@ -12,11 +12,6 @@ class FullnameObject implements DataTransferObject
/**
* UserObject constructor.
* @param string $name
* @param string $email
* @param string $password
* @param string $passwordConfirmation
* @param int|null $type
* @param int|null $status
*/
public function __construct(string $name)
{
@@ -2,8 +2,10 @@
namespace App\Classes\Modules\Billplzs\ControllersLogic;
use ErrorException;
use App\Classes\Exceptions\ResourceNotFoundException;
use App\Http\Resources\TransactionResource;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
@@ -14,19 +16,11 @@ use App\Classes\Modules\Billplzs\DataTransferObjects\BillplzXSignatureObject;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Transactions\Services\FetchesTransaction;
use App\Classes\Modules\Transactions\Services\UpdatesTransactionStatus;
use Illuminate\Support\Facades\Auth;
class CallbackBillplzLogic extends AbstractControllerLogic
class CallbackBillplzLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Callback Billplz',
'message' => 'You have successfully receive Billplz callback'
];
}
/** @var GetBillplzBill */
private $getBillplzBill;
@@ -40,7 +34,7 @@ class CallbackBillplzLogic extends AbstractControllerLogic
/**
* CreateBookingLogic constructor.
* @param CreateGetBillplzBillsBillplzBill $getBillplzBill
* @param GetBillplzBill $getBillplzBill
* @param FetchesTransaction $fetchesTransaction
* @param UpdatesTransactionStatus $updatesTransactionStatus
*/
@@ -54,27 +48,29 @@ class CallbackBillplzLogic extends AbstractControllerLogic
/**
* @param Request $request
* @return JsonResponse
* @throws \App\Classes\Exceptions\AccessForbiddenException
* @throws \App\Classes\Exceptions\MalformedRequestException
* @throws \App\Classes\Exceptions\RequestValidationException
* @return \Illuminate\Http\RedirectResponse
* @throws MalformedRequestException
* @throws ResourceNotFoundException
*/
public function logic(Request $request) : JsonResponse
public function execute(Request $request)
{
$billplzXSignatureObject = new BillplzXSignatureObject($request);
if(!$billplzXSignatureObject->isValidSignature()) throw new MalformedRequestException('Unable to get correct response from billplz server.');
if(!$billplzXSignatureObject->isValidSignature()) throw new MalformedRequestException('Billplz Payment validation failed.');
$billPlz = $this->getBillplzBill->execute($billplzXSignatureObject->getBillPlzId());
if(!$billPlz) throw new MalformedRequestException('Unable to get correct response from billplz server.');
if(!$billPlz) throw new ResourceNotFoundException('Billplz bill not found.');
$transaction = $this->fetchesTransaction->execute(['payment_reference' => $billplzXSignatureObject->getBillPlzId()]);
if($billPlz->state == 'paid') $this->updatesTransactionStatus->execute($transaction, ApprovalStatus::APPROVED);
$this->updatesTransactionStatus->execute($transaction, $billPlz->state === 'paid' ? ApprovalStatus::APPROVED : ApprovalStatus::PENDING_VERIFICATION);
return $this->response(['data' => $billPlz]);
$token = Auth::fromUser(User::find(1));
$request->headers->set('Authorization', 'Bearer '.$token);
return view('pages.payments_redirect', ['marking' => $transaction->booking->marking, 'payment_reference' => $transaction->payment_reference, 'status' => $billPlz->state === 'paid' ? ApprovalStatus::APPROVED : ApprovalStatus::PENDING_VERIFICATION, 'amount' => $transaction->amount]);
// return redirect()->route('booking.details', ['marking' => $transaction->booking->marking, 'payment_status' => $billPlz->state === 'paid' ? ApprovalStatus::APPROVED : ApprovalStatus::PENDING_VERIFICATION]);
}
}
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Billplzs\DataTransferObjects;
use Illuminate\Http\Request;
use App\Classes\General\Interfaces\DataTransferObject;
use function PHPSTORM_META\map;
class BillplzXSignatureObject implements DataTransferObject
{
@@ -30,20 +31,19 @@ class BillplzXSignatureObject implements DataTransferObject
{
$this->request = $request;
$this->billPlzId = $request->id ? $request->id : $request->{'billplz[id]'};
$this->billPlzId = $request->input('billplz')['id'];
$this->requestXSignature = $request->x_signature ? $request->x_signature : $request->{'billplz[x_signature]'};
$this->requestXSignature = $request->input('billplz')['x_signature'];
$this->_constructBillplzArray()->_natSortBillplzArray()->_constructBillplzString()->_computeBillplzXSignature();
}
private function _constructBillplzArray(){
foreach($this->request->all() as $key => $value){
if($key != 'x_signature' && $key != 'billplz[x_signature]'){
$key = str_replace(']', '', str_replace('[', '', $key));
$this->billPlzConstructArray[] = $key.$value;
}
}
$this->billPlzConstructArray = collect($this->request->input('billplz'))->forget('x_signature')->map(function($item, $key){
return 'billplz'.$key.$item;
})->toArray();
return $this;
}
@@ -98,7 +98,7 @@ class BillplzXSignatureObject implements DataTransferObject
public function isValidSignature(): bool
{
return $this->billPlzComputedXSignature == $this->requestXSignature ? true : false;
return $this->billPlzComputedXSignature === $this->requestXSignature ? true : false;
}
}
@@ -7,20 +7,27 @@ use App\Classes\Exceptions\MalformedRequestException;
class CreatesBillplzBill
{
/**
* @return \Illuminate\Database\Eloquent\Model
* @throws \App\Classes\Exceptions\MalformedRequestException
* @param string $name
* @param string $email
* @param string $description
* @param float $amount
* @param string $billNumber
* @param null|string $bankCode
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $name, string $email, string $description, float $amount, string $billNumber, ?string $bankCode = null) {
public function execute(string $name, string $email, string $description, float $amount, string $billNumber, ?string $bankCode = null) {
try{
$response = Http::withBasicAuth(config('billplz.api_key').':', '')->withOptions(["verify"=>false])->post(config('billplz.base_url').'/api/v3/bills', [
'collection_id' => config('billplz.collection_id'),
'name' => $name,
'email' => $email,
'description' => $description,
'amount' => $amount,
'redirect_url' => config('billplz.redirect_url'),
'callback_url' => config('billplz.callback_url'),
'amount' => round($amount, 2) * 100,
'redirect_url' => route('online_payment.redirect'),
'callback_url' => route('api.online_payment.callback'),
'reference_1_label' => 'Bank Code',
'reference_1' => $bankCode ? $bankCode : config('billplz.maybank'),
'reference_2_label' => 'Bill Number',
@@ -2,13 +2,16 @@
namespace App\Classes\Modules\Billplzs\Services;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Http;
class GetBillplzBill
{
/**
* @return \Illuminate\Database\Eloquent\Model
* @throws \App\Classes\Exceptions\MalformedRequestException
* @param string $billPlzId
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $billPlzId) {
try{
@@ -99,7 +99,7 @@ class CreateBookingPaymentLogic extends AbstractControllerLogic
$billNumber = $this->generatesTransactionBillNumber->execute('PYMT-');
if(PaymentMethodType::PAYMENT_METHODS[$request->input('payment_method')] == PaymentMethodType::PAYMENT_GATEWAY){
$billPlzBill = $this->createsBillplzBill->execute($request->user()->name, $request->user()->email, 'This payment is made on behave '.$booking->company->name, $configurations->getTotal(), $billNumber, $request->input('bank_code'));
$billPlzBill = $this->createsBillplzBill->execute($request->user()->name, $request->user()->email, 'This payment is made on behave of '.$booking->company->name, $configurations->getTotal(), $billNumber, $request->input('bank_code'));
}
$object = new TransactionObject($billNumber, TransactionType::PAYMENT, 1, $booking->company->id,
@@ -12,7 +12,7 @@ class CalculatesBookingTransferredAmount
{
public function execute(Booking $booking){
return $booking->transactions()->bills()->transferred()->sum('original_amount');
return $booking->transactions()->bills()->complete()->sum('original_amount');
}
}
@@ -115,7 +115,6 @@ class CreateInvoiceTransactionProcessor
if ((float) $booking_amount > (float) $payable_amount) {
return;
}
// confirm that all payments has been transferred
if($this->calculatesBookingTransferredAmount->execute($booking) !== $this->calculatesBookingPaidAmount->execute($booking)){
return;
@@ -5,12 +5,12 @@ namespace App\Classes\Modules\Transactions\Services;
use App\Classes\General\Eloquent\AbstractUpdateRelationshipRecord;
use App\Classes\General\Interfaces\Transactionable;
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionObject;
use App\Models\Booking;
use App\Models\Transaction;
class CreatesTransaction extends AbstractUpdateRelationshipRecord
{
/**
* @param Transactionable $transactionable
* @param TransactionObject $object
* @return \Illuminate\Database\Eloquent\Model
* @throws \App\Classes\Exceptions\MalformedRequestException
@@ -1,19 +1,20 @@
<?php
namespace App\Http\Controllers\Billplzs;
namespace App\Http\Controllers\Billplz;
use App\Classes\Modules\Billplzs\ControllersLogic\CallbackBillplzLogic;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class CallbackBillplzController
{
/**
* @param Request $request
* @param BillplzBillLogic $logic
* @return JsonResponse
* @param CallbackBillplzLogic $logic
* @return \Illuminate\Http\RedirectResponse
* @throws \App\Classes\Exceptions\MalformedRequestException
* @throws \App\Classes\Exceptions\ResourceNotFoundException
*/
public function callback(Request $request, CallbackBillplzLogic $logic): JsonResponse {
public function callback(Request $request, CallbackBillplzLogic $logic) {
return $logic->execute($request);
}
@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Billplzs;
namespace App\Http\Controllers\Billplz;
use App\Classes\Modules\Billplzs\ControllersLogic\CreateBillplzBillLogic;
use Illuminate\Http\JsonResponse;
@@ -10,7 +10,7 @@ class CreateBillplzBillController
{
/**
* @param Request $request
* @param BillplzBillLogic $logic
* @param CreateBillplzBillLogic $logic
* @return JsonResponse
*/
public function create(Request $request, CreateBillplzBillLogic $logic): JsonResponse {
-1
View File
@@ -24,7 +24,6 @@ class BookingResource extends JsonResource
*/
public function toArray($request)
{
// dd($this->service);
return [
'id' => $this->id,
'company' => new CompanyResource($this->company),
+2 -2
View File
@@ -23,8 +23,8 @@ class TransactionResource extends JsonResource
'type' => (int) $this->type,
'bill_no' => $this->bill_no,
'payment_reference' => $this->payment_reference,
'payment_method' => $this->payment_method,
'recipient_bank_account' => new BankResource($this->when((int) $this->type === TransactionType::BILL,$this->booking->bank)),
'payment_method' => (float) $this->payment_method,
'recipient_bank_account' => new BankResource($this->when((int) $this->type === TransactionType::BILL, $this->booking->bank)),
'amount' => (double) $this->amount,
'original_amount' => (double) $this->original_amount,
'currency' => new CurrencyResource($this->currency),
-3
View File
@@ -6,11 +6,8 @@ use App\Classes\General\Interfaces\Documentable;
use App\Classes\General\Interfaces\Transactionable;
use App\Classes\ValueObjects\Constants\RoleTypes;
use App\Scopes\CustomerBookingsScope;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
@@ -6,8 +6,11 @@
<div class="row m-b-5">
<div class="col-auto">
<div class="font-heading fs-8 muted all-caps">Status</div>
<div class="font-heading fs-10 bold" :class="[{'text-danger': item.status === 1 || item.status === 4}, {'text-success': item.status !== 1 && item.status !== 4}]">
{{ item.status === 1 ? 'Pending Verification' : item.status === 2 ? 'Processing Payment' : item.status === 4 ? 'Rejected' : 'Transferred'}}
<div class="font-heading fs-10 bold" v-if="item.type === 1" :class="[{'text-danger': item.status === 1 || item.status === 4}, {'text-success': item.status !== 1 && item.status !== 4}]">
{{ item.status === 1 ? 'Pending Verification' : item.status === 4 ? 'Rejected' : 'Processing Payment'}}
</div>
<div class="font-heading fs-10 bold" v-if="item.type === 3" :class="[{'text-danger': item.status === 1 || item.status === 4}, {'text-success': item.status !== 1 && item.status !== 4}]">
{{ item.status === 1 ? 'Processing Payment' : 'Transferred'}}
</div>
</div>
<div class="col-auto p-l-0">
@@ -19,16 +22,22 @@
</div>
<div class="row">
<div class="col">
<div class="font-heading fs-8 all-caps" :class="[{'text-danger': item.status === 4}, {'text-primary': item.status !== 4}]">{{ item.status === 1 ? 'Submitted' : item.status === 2 ? 'Received' : item.status === 4 ? 'Rejected' : 'Paid'}} On: {{item.updated_at}}</div>
<div class="font-heading fs-8 all-caps" v-if="(item.payment_method === 5 && item.status !== 0 && item.status !== 1) || item.payment_method !==5" :class="[{'text-danger': item.status === 4}, {'text-primary': item.status !== 4}]">{{ item.status === 1 ? 'Submitted' : item.status === 2 ? 'Received' : item.status === 4 ? 'Rejected' : 'Paid'}} On: {{item.updated_at}}</div>
</div>
</div>
</div>
<div class="col-auto" v-if="item.status !== 3" :class="[{'bg-master-light': item.status === 1}, {'bg-master-lighter': item.status === 2}]">
<div class="row align-items-center h-100">
<div class="row align-items-center h-100" v-if="item.payment_method !== 5">
<div class="col">
<i class="fa" :class="[{'fa-cloud-download': item.status === 1 || item.status === 2}, {'fa-ban': item.status === 4}, {'muted': item.status === 1 || item.status === 2}, {'text-danger': item.status === 4}]"></i>
</div>
</div>
<div class="row align-items-center h-100" v-if="item.payment_method === 5">
<div class="col">
<i class="fa fa-cloud-download muted" v-if="item.status === 2"></i>
<a :href="'https://www.billplz-sandbox.com/bills/'+item.payment_reference"><i class="fa fa-repeat text-success" v-if="item.status !== 2"></i></a>
</div>
</div>
</div>
<div class="col-auto bg-success" v-if="item.status === 3">
<document-file-viewer-component class="h-100" :file="item.documents.files[0]">
@@ -87,7 +96,7 @@
<div class="row">
<div class="col">
<div class="font-heading all-caps fs-10 m-b-5">Your Payment Proof</div>
<div class="row no-margin">
<div class="row no-margin" v-if="item.payment_method !== 5">
<div v-if="customerBooking.documents != null">
<div v-for="file in customerBooking.documents.files" v-bind:key="file.id" class="col-auto no-padding m-r-5">
<document-file-viewer-component :file="file">
@@ -100,6 +109,13 @@
</div>
</div>
</div>
<div class="row no-margin" v-if="customerBooking.payment_method === 5 && (customerBooking.status === 2 || customerBooking.status === 3)">
<a :href="'https://www.billplz-sandbox.com/bills/'+customerBooking.payment_reference" target="_blank">
<div class="icon-thumbnail fs-11 text-white icon-25 bg-primary btn-rounded float-left m-r-5">
<i class="fa fa-file-image-o fs-10"></i>
</div>
</a>
</div>
</div>
<div class="col text-right">
<div class="font-heading all-caps fs-10 m-b-5">Our Payment Proof</div>
@@ -116,7 +132,7 @@
</div>
</div>
</div>
<div class="row m-t-10">
<div class="row m-t-10 hide">
<div class="col">
<button class="btn btn-xs all-caps b-rad-none btn-success btn-block requestModal" data-type="transferSummary">Request Refund</button>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="transferSummary" size="large">
@@ -30,7 +30,7 @@
<div class="col-auto">
<div class="font-heading fs-10 muted all-caps">Date</div>
<div class="font-heading fs-10">
{{item.documents.created_at}}
{{item.payment_method === 5 ? item.updated_at : item.documents.created_at}}
</div>
</div>
<div class="col-auto">
File diff suppressed because one or more lines are too long
@@ -8,12 +8,17 @@
<div class="font-heading all-caps fs-12 bold">Congratulation, you have got great rates.</div>
</div>
</div>
<div class="row m-b-25">
<div class="row m-b-25" v-if="payment_method !== 'payment_gateway'">
<div class="col">
<div class="font-heading fs-11">You can proceed by bank in <span class="text-success bold">{{(Math.round((calculation.total + Number.EPSILON) * 100) / 100).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}} MYR</span> to the bank account detailed below and upload your payment proof to proceed with your transfer after clicking on the confirm button below.</div>
</div>
</div>
<div class="row align-items-center m-b-25">
<div class="row m-b-25" v-if="payment_method === 'payment_gateway'">
<div class="col">
<div class="font-heading fs-11">You will be redirected to your bank to complete the payment of <span class="text-success bold">{{(Math.round((calculation.total + Number.EPSILON) * 100) / 100).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}} MYR</span> after clicking on the confirm button below. please follow your bank instruction to complete the payment</div>
</div>
</div>
<div class="row align-items-center m-b-25" v-if="payment_method !== 'payment_gateway'">
<div class="col-auto p-r-0">
<div class="icon-thumbnail icon-50 bg-master-lightest">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
@@ -42,7 +47,7 @@
</div>
<div class="row m-b-20">
<div class="col">
<div class="font-heading text-danger fs-10 m-b-5">Please upload your payment proof before the booking expires within {{calculation.payment_attempt_limit}}.</div>
<div class="font-heading text-danger fs-10 m-b-5">Please <span v-if="payment_method !== 'payment_gateway'">upload your payment proof </span><span v-if="payment_method === 'payment_gateway'">complete your payment</span> before the booking expires within {{calculation.payment_attempt_limit}}.</div>
</div>
</div>
<div class="row m-b-5">
@@ -77,6 +82,9 @@
payment_method: {
required: true
},
bank_code: {
required: false
},
id: {
type: Number,
required: true
@@ -91,6 +99,7 @@
parameters: {
payment_method: this.payment_method,
amount: this.amount,
bank_code: this.bank_code,
}
}
},
@@ -104,7 +113,7 @@
this.closeModal();
if (response.payload.data.payment_method === 5) {
window.location.href = 'https://www.billplz.com/bills/' + response.payload.data.payment_reference + '?auto_submit=true';
window.location.href = 'https://www.billplz-sandbox.com/bills/' + response.payload.data.payment_reference + '?auto_submit=true';
}
}
}
@@ -0,0 +1,33 @@
<template>
<div class="row">
<div class="col">
<loading-component style="height: 300px; top: 0;" key="1" color="success" v-show="isLoading" ></loading-component>
<div class="row justify-content-center" v-show="!isLoading">
<div class="col">
<div class="row m-b-20">
<div class="col">
<h3 class="all-caps">Are you Sure?</h3>
<div class="fs-11">Are you sure you want to regenerate the invoices for this transfer?</div>
</div>
</div>
<div class="row">
<div class="col p-r-5">
<div class="btn btn-sm btn-success btn-block b-rad-none" data-dismiss="modal">Cancel</div>
</div>
<div class="col p-l-5">
<div class="btn btn-sm btn-danger btn-block b-rad-none" @click="submit(route('api.booking.regenerate.invoice', data.id), 'post', section, true, true)">Confirm</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import componentHandler from '../../../general/mixins/componentHandler';
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
export default {
mixins: [componentHandler, ModalFormHandler]
}
</script>
@@ -4,7 +4,7 @@
<loading-component style="height: 200px; top: 0;" key="1" color="success" v-show="isLoading"></loading-component>
<div class="row" v-if="booking">
<div class="col">
<div class="row m-b-50" v-if="booking.status === 3 && transactionsComplete">
<div class="row m-b-50" v-if="booking.status === 3">
<div class="col-10 no-padding">
<div class="row">
<div class="col">
@@ -203,6 +203,10 @@
<purchase-order-form-component :data="booking" :section="section"></purchase-order-form-component>
</div>
</div>
<div class="btn btn-xs all-caps b-rad-none btn-danger pointer requestModal" data-type="regenerateInvoices" v-if="booking.status === 3 && $store.getters.isSuperAdmin">Regenerate Invoices</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="regenerateInvoices">
<regenerate-booking-invoices-component :data="booking" :section="section" class="text-center"></regenerate-booking-invoices-component>
</modal-component>
</div>
<div class="col-12 col-sm-12 col-md-3">
<booking-payment-quotation-component :data="booking" :section="section"></booking-payment-quotation-component>
@@ -250,7 +254,16 @@
</div>
</div>
</div>
<div class="col-auto p-l-5 p-r-5 bg-success requestModal pointer" data-type="identificationVerificationModal">
<div class="col-auto p-l-5 p-r-5 bg-success pointer" v-if="item.payment_method === 5">
<a :href="'https://www.billplz-sandbox.com/bills/'+item.payment_reference">
<div class="row align-items-center h-100">
<div class="col">
<i class="fa fa-repeat fs-20 text-white p-l-10 p-r-10"></i>
</div>
</div>
</a>
</div>
<div class="col-auto p-l-5 p-r-5 bg-success requestModal pointer" v-if="item.payment_method !== 5" data-type="paymentProofModal">
<div @click="selectedID(item.id)" class="row align-items-center h-100">
<div class="col">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
@@ -263,7 +276,7 @@
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="deleteAttempt">
<delete-payment-attempt-form-component :data="item" :section="section" class="text-center"></delete-payment-attempt-form-component>
</modal-component>
<modal-component type="identificationVerificationModal">
<modal-component type="paymentProofModal">
<payment-verification-form-component v-if="selected_id == item.id" :section="section" :id="booking.id" :data="item"></payment-verification-form-component>
</modal-component>
</div>
@@ -4,7 +4,7 @@
<div class="col">
<booking-details-section-component :marking={{$marking}}></booking-details-section-component>
@if(!env('IS_PRODUCTION'))
<a class="btn btn-xs all-caps b-rad-none btn-warning" href="{{ route('booking.merge', $marking)}}">Merge Transfer Orders</a>
{{--<a class="btn btn-xs all-caps b-rad-none btn-warning" href="{{ route('booking.merge', $marking)}}">Merge Transfer Orders</a>--}}
@endif
</div>
</div>
@@ -328,7 +328,7 @@
<div class="col">
<div class="row">
<div class="col">
<list-component ref="paymentProofList" section="paymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 1, type: 3, issuer_in: [2]}">
<list-component ref="paymentProofList" section="paymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 1, type: 3, issuer_in: [2, 5]}">
<template slot="list" slot-scope="{data}">
<payment-proof-component :data="data"></payment-proof-component>
</template>
File diff suppressed because one or more lines are too long
+1 -7
View File
@@ -23,13 +23,7 @@ Route::group(['middleware' => 'api', 'prefix' => 'v1', 'as' => 'api.'], function
Route::get('countries/list', 'Services\CountriesListController@index')->name('list.countries');
});
Route::group(['prefix' => 'billplz', 'as' => 'billplz.', 'namespace' => 'Billplzs'], function () {
Route::group(['prefix' => 'bill', 'as' => 'bill.'], function () {
Route::post('/callback', 'CallbackBillplzController@callback')->name('callback');
});
});
Route::post('online_payment/callback', 'billplz\CallbackBillplzController@callback')->name('online_payment.callback');
Route::group(['middleware' => 'valid.token'], function () {
+1 -1
View File
@@ -2,7 +2,7 @@
use Illuminate\Support\Facades\Route;
Route::group(['prefix' => 'billplz', 'as' => 'billplz.', 'namespace' => 'Billplzs'], function () {
Route::group(['prefix' => 'billplz', 'as' => 'billplz.', 'namespace' => 'Billplz'], function () {
Route::group(['prefix' => 'bill', 'as' => 'bill.'], function () {
Route::post('/create', 'CreateBillplzBillController@create')->name('create');
});
+7 -3
View File
@@ -100,9 +100,13 @@ Route::get('/test', function(){
});
Route::get('/bookings/billplz', function () {
return view('pages.billplz_redirect');
})->name('bookings.billplz');
Route::get('/online_payment/redirect', 'billplz\CallbackBillplzController@callback')->name('online_payment.redirect');
//Route::get('/online_payment/redirect', function () {
// return view('pages.billplz_redirect');
//})->name('online_payment.redirect');
Route::get('/export/customers/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@export');