Join our FREE personalized newsletter for news, trends, and insights that matter to everyone in America

Newsletter
New

How Can I Set Purchases For Digital Products Using Omnipay Paypal?

Card image cap

I've implemented paypal using omnipay in laravel and it works, apparently the transations are done, the money is sended from client sandbox account and received on the business acccount. But i realized that on the shipping center of paypal dashboard from the business account, the sales are marked as pending orders, because of the shiping i think.

So i'm worried if this could be a problem because the products or services doesn't need to be shipped. And how can i fix or deal with this situation, is something a can configure on code or it needs to be done on paypal's dashboard.

This is my first time integrating paypal, and i really need a way to set that when the money is transfered the sale is completed or at least be sure that the money will stay on the seller account.

Im pretty novice with this, so i still looking for information but i apreciate your tips and comments.

This is how the purchase is donde with the library:

                $response = $this->gateway->purchase(array(  
                    'amount' => number_format($payAmount, 2, '.', ''),  
                    'currency' => session('currency'),  
                    'description' => 'Compra de articulos de prueba',  
                    'soft_descriptor' => 'Pago de concepto',  
                    'items' => $itemsList,  
                    'returnUrl' => url('get-success'),  
                    'cancelUrl' => url('payment-error')  
                ))->send();  

Also here is the response i get from paypal when the process is completed, i know there are some fields where it says that the sale is completed, but im cant tell if after a time the money will be refound if not marked as shipped:

{  
    "id": "PAYID-NHGAJMA02196280M18779525",  
    "intent": "sale",  
    "state": "approved",  
    "cart": "0587169880009782L",  
    "payer": {  
        "payment_method": "paypal",  
        "status": "VERIFIED",  
        "payer_info": {  
            "email": "sb-henga48778231@personal.example.com",  
            "first_name": "John",  
            "last_name": "Doe",  
            "payer_id": "DRCPR5J5VKQRG",  
            "shipping_address": {  
                "recipient_name": "John Doe",  
                "line1": "Calle Juarez 1",  
                "line2": "Col. Cuauhtemoc",  
                "city": "Miguel Hidalgo",  
                "state": "Ciudad de Mexico",  
                "postal_code": "11580",  
                "country_code": "MX"  
            },  
            "country_code": "MX"  
        }  
    },  
    "transactions": [  
        {  
            "amount": {  
                "total": "700.00",  
                "currency": "MXN",  
                "details": {  
                    "subtotal": "700.00",  
                    "shipping": "0.00",  
                    "insurance": "0.00",  
                    "handling_fee": "0.00",  
                    "shipping_discount": "0.00",  
                    "discount": "0.00"  
                }  
            },  
            "payee": {  
                "merchant_id": "W4ATUPN3YD5GL",  
                "email": "sb-d8lfo48754256@business.example.com"  
            },  
            "description": "Compra de articulos de prueba",  
            "soft_descriptor": "PAYPAL *TEST STORE",  
            "item_list": {  
                "items": [  
                    {  
                        "name": "EXAMEN  AGOSTO\/2024",  
                        "price": "140.00",  
                        "currency": "MXN",  
                        "tax": "0.00",  
                        "quantity": 1,  
                        "image_url": ""  
                    },  
                    {  
                        "name": "EXAMEN  SEPTIEMBRE\/2024",  
                        "price": "140.00",  
                        "currency": "MXN",  
                        "tax": "0.00",  
                        "quantity": 1,  
                        "image_url": ""  
                    },  
                    {  
                        "name": "EXAMEN  OCTUBRE\/2024",  
                        "price": "140.00",  
                        "currency": "MXN",  
                        "tax": "0.00",  
                        "quantity": 1,  
                        "image_url": ""  
                    },  
                    {  
                        "name": "EXAMEN  NOVIEMBRE\/2024",  
                        "price": "140.00",  
                        "currency": "MXN",  
                        "tax": "0.00",  
                        "quantity": 1,  
                        "image_url": ""  
                    },  
                    {  
                        "name": "EXAMEN  DICIEMBRE\/2024",  
                        "price": "140.00",  
                        "currency": "MXN",  
                        "tax": "0.00",  
                        "quantity": 1,  
                        "image_url": ""  
                    }  
                ],  
                "shipping_address": {  
                    "recipient_name": "John Doe",  
                    "line1": "Calle Juarez 1",  
                    "line2": "Col. Cuauhtemoc",  
                    "city": "Miguel Hidalgo",  
                    "state": "Ciudad de Mexico",  
                    "postal_code": "11580",  
                    "country_code": "MX"  
                }  
            },  
            "related_resources": [  
                {  
                    "sale": {  
                        "id": "8A498718T4612240F",  
                        "state": "completed",  
                        "amount": {  
                            "total": "700.00",  
                            "currency": "MXN",  
                            "details": {  
                                "subtotal": "700.00",  
                                "shipping": "0.00",  
                                "insurance": "0.00",  
                                "handling_fee": "0.00",  
                                "shipping_discount": "0.00",  
                                "discount": "0.00"  
                            }  
                        },  
                        "payment_mode": "INSTANT_TRANSFER",  
                        "protection_eligibility": "ELIGIBLE",  
                        "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE",  
                        "transaction_fee": {  
                            "value": "43.93",  
                            "currency": "MXN"  
                        },  
                        "receivable_amount": {  
                            "value": "35.74",  
                            "currency": "USD"  
                        },  
                        "exchange_rate": "0.054469895639357",  
                        "parent_payment": "PAYID-NHGAJMA02196280M18779525",  
                        "create_time": "2026-03-31T17:30:43Z",  
                        "update_time": "2026-03-31T17:30:43Z",  
                        "links": [  
                            {  
                                "href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/sale\/8A498718T4612240F",  
                                "rel": "self",  
                                "method": "GET"  
                            },  
                            {  
                                "href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/sale\/8A498718T4612240F\/refund",  
                                "rel": "refund",  
                                "method": "POST"  
                            },  
                            {  
                                "href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/payment\/PAYID-NHGAJMA02196280M18779525",  
                                "rel": "parent_payment",  
                                "method": "GET"  
                            }  
                        ],  
                        "soft_descriptor": "PAYPAL *TEST STORE"  
                    }  
                }  
            ]  
        }  
    ],  
    "failed_transactions": [],  
    "create_time": "2026-03-31T17:30:24Z",  
    "update_time": "2026-03-31T17:30:43Z",  
    "links": [  
        {  
            "href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/payment\/PAYID-NHGAJMA02196280M18779525",  
            "rel": "self",  
            "method": "GET"  
        }  
    ]  
}