Paypal Order Data Captured
This commit is contained in:
parent
31cd625644
commit
1de08b17cf
|
|
@ -897,6 +897,10 @@ class Cart
|
|||
$finalData['items'][] = $this->prepareDataForOrderItem($item);
|
||||
}
|
||||
|
||||
if ($finalData['payment']['method'] === 'paypal_smart_button') {
|
||||
$finalData['payment']['additional'] = request()->get('data');
|
||||
}
|
||||
|
||||
return $finalData;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddAdittionalDataToOrderPaymentTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('order_payment', function (Blueprint $table) {
|
||||
$table->json('additional')->after('order_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('order_payment', function (Blueprint $table) {
|
||||
$table->dropColumn('additional');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@ namespace Webkul\Sales\Models;
|
|||
use Illuminate\Database\Eloquent\Model;
|
||||
use Webkul\Sales\Contracts\OrderPayment as OrderPaymentContract;
|
||||
|
||||
|
||||
class OrderPayment extends Model implements OrderPaymentContract
|
||||
{
|
||||
protected $table = 'order_payment';
|
||||
|
|
@ -15,4 +14,8 @@ class OrderPayment extends Model implements OrderPaymentContract
|
|||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'additional' => 'array'
|
||||
];
|
||||
}
|
||||
Loading…
Reference in New Issue