panel
panel copied to clipboard
feat: CryptoBot payments
I’m just adding new optional payment method
what is it? - https://help.crypt.bot/crypto-pay-api
Hi! It looks very cool, but could you change the Russian localization to English? Thank you for helping to improve cpgg ❤️
Only one thing, for some reason money doesn’t add after sending event with payment. So I added this construction:
try {
$user->increment('credits', $payment->amount);
} catch (Exception $exception) {
throw $exception;
}
I’m sure, that it is not right way to do that. I don’t know what happens in your code.
Hi! It looks very cool, but could you change the Russian localization to English? Thank you for helping to improve cpgg ❤️
Oh sorry, I have missed that. Couple minutes.
awesome!
Only one thing, for some reason money doesn’t add after sending event with payment. So I added this construction:
try { $user->increment('credits', $payment->amount); } catch (Exception $exception) { throw $exception; }
I’m sure, that it is not right way to do that. I don’t know what happens in your code.
@IceToast mind checking this?
So i see you've created a extension with all the necessary information. I will sketch out the payment workflow:
User payment request -> URL fetching from extension -> Redirecting to payment URL -> ... -> Success redirection to success route of extension -> done
Gateway Webhook -> request to extension webhook route -> sets a payment as "paid" -> emits a user payment event -> payment listener updates user credits and possibly any new limits -> done
The first thing i noticed is that you might want to validate that the webhook request actually wants to update a payment to the PAID status. In your PR it will set it to PAID under any circumstances? Maybe im missing something about the gateway.
For your problem: You should debug into CryptoBotExtension.php:110 to see whether the event really gets triggered and what da parameters are. If everything is processed correctly the event will be listened to in here: Listeners/UserPayment.php
@IceToast Thanks, I will come back with result soon.
@gru2007 Is there any news about fixes?
@gru2007 Is there any news about fixes?
Excuse me for afk, I just haven’t enough time to solve that right now. I’ll do it in near future.
@gru2007 Is there any news about fixes?
Excuse me for afk, I just haven’t enough time to solve that right now. I’ll do it in near future.
Ok, no problem
updated the branch @gru2007 any news ? :)
damn good review
damn good review
I decided to double-check this PR so that there would be no problems in the future
any update ?
if there is no update soon this PR will be closed