thephpleague / omnipay-paypal

PayPal driver for the Omnipay PHP payment processing library
MIT License
299 stars 174 forks source link

PayPal tax #68

Closed ChristopherDosin closed 9 years ago

ChristopherDosin commented 9 years ago

Hi,

currently i try to get my paypal checkout working with laravel. Therefore i used your awesome package.

I have a question - currently this is a snippet of my post method

 public function postPayment()
    {
        $params = array(
            'cancelUrl'     => 'http://localhost/cancel_order',
            'returnUrl'     => 'http://localhost/payment_success',
            'name'      => Input::get('name'),
            'description'   => Input::get('description'),
            'amount'    => Input::get('price'),
            'currency'  => Input::get('currency'),

        );

        Session::put('params', $params);
        Session::save();

        $gateway = Omnipay::create('PayPal_Express');
......
....
........
        $response = $gateway->purchase($params)->send();
.......

So far its working. The payment was made and saved to the database. But where can i set the tax for my product ? Where do i find the variables which i can post to paypal ?

In the dev docu i didnt found anything so far.

greydnls commented 9 years ago

@hostianer you can use the setTaxAmount() method seen here:

https://github.com/thephpleague/omnipay-paypal/blob/master/src/Message/AbstractRequest.php#L183

officialmmt commented 3 years ago

When we will use this method, which step?