Back to Easy Shop Support

paulgrafx
paulgrafx

Just checking when doing a PayPal payment. Is the just the thanks (Awaiting Payment) and cancel url.

Can it receive the status as being verified and paid? or is this status only changed in the admin?

Last updated

paulgrafx
paulgrafx

NOTE: This is not the best solution since I have had to change the plugins code.

Okay I have had to change the code to make the PayPal status classed as fulfilled on the thank you page so for example url https://your-shop-website.com/cart?order_id=23&thanks=true

File: /components/CartContainer.php Line 123...

if(input('order_id')){
    if($order = Order::find(input('order_id'))){
        if(input('cancel')){
            $order->status = 'cancelled';
            $order->save();
        }

        // Make the cart empty and update the order items
        if(input('thanks') == true && $order->gateway == 'paypal') {
            $order->status = 'await_fulfill';
            $order->is_paid = true;
            $order->is_confirmed = true;
            $order->paid_at = Carbon::now();
            $order->save();

            $order->reduceInventory();
            $order->sendNotification();
            Cart::clear();
        }

Last updated

1-2 of 2