added api for tracking
This commit is contained in:
@@ -8,6 +8,7 @@ use Illuminate\Http\Request;
|
||||
use Netshell\Paypal\Facades\Paypal;
|
||||
use App\Models\teamstore\TeamStoreModel;
|
||||
use App\Models\user\UserModel;
|
||||
use App\Models\ApiModel;
|
||||
use App\Models\paypal\PayPalModel;
|
||||
// use Auth;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
@@ -19,7 +20,6 @@ use Illuminate\Support\Facades\Redirect;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
|
||||
|
||||
class PaypalController extends Controller
|
||||
{
|
||||
|
||||
@@ -74,8 +74,6 @@ class PaypalController extends Controller
|
||||
$payer = PayPal::Payer();
|
||||
$payer->setPaymentMethod('paypal');
|
||||
|
||||
|
||||
|
||||
$m = new TeamStoreModel;
|
||||
$paypal_model = new PayPalModel;
|
||||
$last_id = $paypal_model->getLastIdPaymentDetails();
|
||||
@@ -382,6 +380,17 @@ class PaypalController extends Controller
|
||||
});
|
||||
// end email sending
|
||||
|
||||
|
||||
$insertTracking = array(
|
||||
"StepId" => 1,
|
||||
"ScannedBy" => 1,
|
||||
"InvoiceNumber" => $invoice_number,
|
||||
"created_at" => date('Y-m-d H:i:s')
|
||||
);
|
||||
|
||||
$ApiModel = new ApiModel;
|
||||
$ApiModel->insertTracking($insertTracking);
|
||||
|
||||
$request->session()->forget('cartkey'); // clear session for cartkey
|
||||
|
||||
// redirect to thank you page.
|
||||
|
||||
Reference in New Issue
Block a user