hexters / CoinPayment

Package to handle payment of cryptocurrency
https://www.coinpayments.net/index.php?ref=3dc0c5875304cc5cc1d98782c2741cb5
MIT License
73 stars 42 forks source link

Payment Methods are not Loading #18

Closed nasirkhannstu closed 5 years ago

nasirkhannstu commented 5 years ago

payment

nasirkhannstu commented 5 years ago

My Console console

hexters commented 5 years ago

Open network tab, click response error in your list request. click preview and see what the error ?

nasirkhannstu commented 5 years ago

network This is my network tab. I Did exactly how documentation tells to do.

JJRuizDeveloper commented 5 years ago

Same problem here

JJRuizDeveloper commented 5 years ago

I fix the problem.

The problem is a division by zero.

Go to vendor>hexters>coinpayment>src>Http>Controllers>CoinPaymentController.php

There, line 39 is failing beacuse a division by zero. I avoid it replacing the line:

$rate = ($rateAmount / $rates[$i]['rate_btc']);

for this one:

$rates[$i]['rate_btc'] == 0 ? 0 : $rate = ($rateAmount / $rates[$i]['rate_btc']);

Now it's working and I'm testing if everything works as I expected. I hope it helps!

nasirkhannstu commented 5 years ago

@hexters @JJRuizSeisCocos is everything working with this fixes??

JJRuizDeveloper commented 5 years ago

Yes, fixed. Everything working fine for me.

nasirkhannstu commented 5 years ago

@hexters it this the desired way to do this? Please answer.

hexters commented 5 years ago

I think this in problem from https://www.coinpayments.net please checking again for your account setting

nasirkhannstu commented 5 years ago

@hexters Can you please give me some hints which settings should i double check??

divino11 commented 5 years ago

@hexters, Hi, how to solve this problem, do you have idea? I do not want to go to the vendor)

kasus commented 5 years ago

@hexters this problem is solved already in the master branch, but it doesn't have version tag. That's why composer install 1.1.3 version, which is not the latest

shoutershub commented 5 years ago

i don't like the ideal of editing my vendor file to clear this error, any other alternative, plus i tried reinstalling the package again same issue, for now i would settle for editing my vendor file, hopefully till this is resolved.