updated
This commit is contained in:
@@ -527,8 +527,17 @@ class PaypalController extends Controller
|
||||
$other_email[] = $userdata->other_email;
|
||||
}
|
||||
|
||||
// if ($other_email[0] != null) {
|
||||
// $other_email = implode(", ", $other_email);
|
||||
// $email_cc = "orders@merchbay.com" . "," . $other_email;
|
||||
// } else {
|
||||
// $email_cc = "orders@merchbay.com";
|
||||
// }
|
||||
|
||||
if ($other_email[0] != null) {
|
||||
$other_email = implode(", ", $other_email);
|
||||
$other_email = implode(", ", array_filter($other_email, function ($value) {
|
||||
return !is_null($value) && $value !== '';
|
||||
}));
|
||||
$email_cc = "orders@merchbay.com" . "," . $other_email;
|
||||
} else {
|
||||
$email_cc = "orders@merchbay.com";
|
||||
|
||||
@@ -1,51 +1,56 @@
|
||||
<?php namespace App\Models\paypal;
|
||||
<?php
|
||||
|
||||
namespace App\Models\paypal;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PayPalModel extends Model {
|
||||
class PayPalModel extends Model
|
||||
{
|
||||
|
||||
function insertToPaypalDetails($data){
|
||||
function insertToPaypalDetails($data)
|
||||
{
|
||||
|
||||
$i = DB::table('payment_details')->insertGetId($data);
|
||||
return $i;
|
||||
}
|
||||
|
||||
|
||||
function insertToOrders($ck){
|
||||
|
||||
function insertToOrders($ck)
|
||||
{
|
||||
|
||||
// $i = DB::table('orders')->insert($data);
|
||||
$pdo = DB::connection()->getPdo();
|
||||
|
||||
$query = $pdo->prepare("INSERT INTO orders SELECT * FROM cart_tmp where CartKey = '$ck'");
|
||||
$i = $query->execute();
|
||||
|
||||
|
||||
return $i;
|
||||
}
|
||||
|
||||
function insertShippingAddress($data){
|
||||
function insertShippingAddress($data)
|
||||
{
|
||||
|
||||
$i = DB::table('shipping_addresses')->insert($data);
|
||||
return $i;
|
||||
}
|
||||
|
||||
function getLastIdPaymentDetails(){
|
||||
function getLastIdPaymentDetails()
|
||||
{
|
||||
|
||||
$i = DB::table('payment_details')
|
||||
->orderby('Id', 'DESC')
|
||||
->take(1)
|
||||
->get();
|
||||
// var_dump($i);
|
||||
->orderby('Id', 'DESC')
|
||||
->take(1)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function checkCartKey($ck){
|
||||
function checkCartKey($ck)
|
||||
{
|
||||
|
||||
$i = DB::table('payment_details')
|
||||
->where('CartKey', $ck)
|
||||
// ->take(1)
|
||||
->get();
|
||||
// var_dump($i);
|
||||
->where('CartKey', $ck)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">Store URL</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" disabled value="{{ $store_array[0]->StoreUrl }}" name="store_url" placeholder="Store URL" reqiured="required" />
|
||||
<input type="text" class="form-control" readonly value="{{ $store_array[0]->StoreUrl }}" name="store_url" placeholder="Store URL" reqiured="required" />
|
||||
<input type="hidden" class="form-control" value="{{ $store_array[0]->StoreUrl }}" name="orig_store_url" reqiured="required" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user