vendredi 1 avril 2016

Working with Paypal cancel_return

I'm doing my project with laravel 5 and here I have to do payment with paypal. I got this code and doing well with my payments. But when someone goto paypal and if he return without doing payment cancel_return works.It's fine. But I don't know how to handle the $_GET when return Here is my route also

Route::get('/paypal/cancel','Paypal\PaypalController@paypalCancel');

I'm using this code to move to paypal page with my sandbox account.

form action="http://ift.tt/xpRUtH" method="post" id="paypal">

        <input type="hidden" name="cmd" value="_xclick" />
        <input type="hidden" name="cbt" value="Return to example" />
        <input type="hidden" name="business" value="xxx@gmail.com" />
        <input type="hidden" name="item_name" value="{{$data['p_name']}}" />
        <input type="hidden" name="amount" value="{{$data['tot']}}">
        <input type="hidden" name="button_subtype" value="services" />
        <input type="hidden" name="no_shipping" value="0">
        <input type="hidden" name="return" value="{{url('/paypal/return')}}" />
        <input type="hidden" name="notify_url" value="{{url('/paypal/notify')}}"/>
        <input type="hidden" name="cancel_return" value="{{url('/paypal/cancel')}}" />
        <input type="hidden" name="currency_code" value="USD"/>
        <input type="hidden" name="image_url" value="" />
        <input type="hidden" id="custom" name="custom" value="{{$data['id']}}"/>
        <input type="hidden" class="btn btn-primary" style="width:100%" alt="PayPal - The safer, easier way to pay online!"/>

    </form>

Just tell me what should I have do when user cancel his payment in paypal login and return..Thanks..



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1UGSUiw
via IFTTT

Aucun commentaire:

Enregistrer un commentaire