anouarabdsslm/laravel-paypalpayment

I hava a problem with 'Control-Allow-Origin'

leifermendez opened this issue · 2 comments

Hi Bro, sorry for my bad english, i need your help, i used your module PaypalPayment in my Laravel Project, work 100%. The problem ocurre because implemented front and backend separes, so the error. is a CROSS-ORIGIN
Thank!
PD: attached screenshot
captura de pantalla 2017-08-02 a la s 3 07 40 p m

Hi @leifermendez ,
I have also went across this kind of problem, there are two ways to solve this problem,

  1. In you laravel project public/index.php file in top most add
    header("Access-Control-Allow-Origin: *"); header('Access-Control-Allow-Methods: GET, POST, OPTIONS'); header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, Authorization, X-Request-With'); header('Access-Control-Allow-Credentials: true');

  2. If you are using chrome browser then you can add [this extension named CORS].(https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en)

Hopping this will help :)

@leifermendez try @binitghetiya because this issue has nothing to do with the package itself. i think. will close this issue now, but feel free to re-open it if you need more explanation.