victorybiz / laravel-crypto-payment-gateway Goto Github PK
View Code? Open in Web Editor NEWGoUrl.io Crypto Payment Gateway for Laravel
License: MIT License
GoUrl.io Crypto Payment Gateway for Laravel
License: MIT License
$payment_url = LaravelCryptoPaymentGateway::startPaymentSession([
'amount' => 0.0000001, // OR 'amount' when sending BTC value
'orderID' => 1,
'userID' => Auth::user()->id,
'redirect' => url()->full(),
]);
Error Action Victorybiz\LaravelCryptoPaymentGateway\Http\Controllers\CryptoPaymentController not defined.
callback function works from gourl site https://gourl.io/info/ipn/IPN_Website_Testing.html#new
I made payment but in the message i received there was no userID and orderID is was labelled as unknown and in my database too it was empty.
Fill in amount to proceed to Deposite
After following all the required steps and setting up my payment controller, once I click the submit button, I get the error message Invalid Order ID - . Max: 50 symbols
`public static function ipn ($cryptoPaymentModel, $payment_details, $box_status)
{
if($cryptoPaymentModel){
$userOrder = Payment::where('payment_id', $cryptoPaymentModel->payment_id)->first();
if(!$userOrder){
Payment::create([
'payment_id' => $cryptoPaymentModel->payment_id,
'user_id' => Auth::user()->id,
'amount' => floatval($payment_details['amount']),
'amountusd' => floatval($payment_details['amountusd']),
'coinlabel' => $payment_details['coinlabel'],
'txconfirm' => $payment_details['confirmed'],
'status' => $payment_details['status'],
]);
}
if($userOrder && $box_status == "cryptobox_updated"){
$userOrder->txconfirm = $payment_details['confirmed'];
$userOrder->save();
}
if(!$cryptoPaymentModel->processed && $payment_details['confirmed']){
// add custom logic here
$cryptoPaymentModel->setStatusAsProcessed();
}
}
return true;
}`
payment Form
<div class="contact-form"> <form id="contact-form" class="form" name="payment" method="POST" action="{{ route('payments.crypto.pay') }}"> @csrf <div class="row"> <div class="form-group col-12 mb-3"> <label>Choose Plan:</label> <select class="form-select form-control" id="" name="plan"> <option value="starter">Starter</option> <option value="gold" selected>Gold</option> <option value="premium">Premium</option> </select> </div> <input type="hidden" name="user_id" value="{{ Auth::user()->id }}"> <div class="form-group col-12 mb-3"> <label>Enter your Amount:</label> <input name="amount" class="form-control" id="amountusd" required="required" type="text"> </div> <input type="hidden" name="redirect" value="{{ url()->full() }}"> <div class="form-group col-lg-12 mb-0 text-center"> <div class="actions"> <input value="Place Order" name="submit" id="submitButton" class="btn btn-contact-bg" type="submit"> <img src="assets/img/ajax-loader.gif" id="loader" style="display:none" alt="loading" width="16" height="16"> </div> </div> </div> </form> </div>
Route:
Route::get('/payment-process', [UserController::class, 'paymentProcessing'])->name('payment-process')->middleware('auth'); Route::match(['get', 'post'], '/payments/crypto/pay', Victorybiz\LaravelCryptoPaymentGateway\Http\Controllers\CryptoPaymentController::class)->name('payments.crypto.pay'); Route::post('/payments/crypto/callback', [App\Http\Controllers\Payment\PaymentController::class, 'callback'])->withoutMiddleware(['web', 'auth']);
Hi.
When I execute
$payment_url = LaravelCryptoPaymentGateway::startPaymentSession([
'amount' => 0.0000001, // OR 'amount' when sending BTC value
'orderID' => 1,
'userID' => Auth::user()->id,
'redirect' => url()->full(),
]);
My result is
Action Victorybiz\LaravelCryptoPaymentGateway\Http\Controllers\CryptoPaymentController not defined.
When I try install just say this
Problem 1
- victorybiz/laravel-crypto-payment-gateway[dev-main, v0.0.1, v1.0.0, ..., v1.1.0] require illuminate/support ^8.0 -> found illuminate/support[v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires victorybiz/laravel-crypto-payment-gateway * -> satisfiable by victorybiz/laravel-crypto-payment-gateway[dev-main, v0.0.1, v1.0.0, v1.0.1, v1.0.2, v1.1.0].
And I cant continue. Please help me to run it
When I put the code in Web.php show this error,
I do the publish and is not working yet
โข App\Http\Controllers\Victorybiz\LaravelCryptoPaymentGateway\src\Http\Controllers\CryptoPaymentController
was not found: Controller class App\Http\Controllers\Victorybiz\LaravelCryptoPaymentGateway\src\Http\Controllers\CryptoPaymentController
for one of your routes was not found. Are you sure this controller exists and is imported correctly?
I neeed publish the files manually?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.