One Hat Cyber Team
Your IP:
216.73.216.176
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
proc
/
self
/
cwd
/
Edit File:
Checkout.tar
Session.php 0000644 00000027120 15107472632 0006711 0 ustar 00 <?php // File generated from our OpenAPI spec namespace Stripe\Checkout; /** * A Checkout Session represents your customer's session as they pay for * one-time purchases or subscriptions through <a href="https://stripe.com/docs/payments/checkout">Checkout</a> * or <a href="https://stripe.com/docs/payments/payment-links">Payment Links</a>. We recommend creating a * new Session each time your customer attempts to pay. * * Once payment is successful, the Checkout Session will contain a reference * to the <a href="https://stripe.com/docs/api/customers">Customer</a>, and either the successful * <a href="https://stripe.com/docs/api/payment_intents">PaymentIntent</a> or an active * <a href="https://stripe.com/docs/api/subscriptions">Subscription</a>. * * You can create a Checkout Session on your server and redirect to its URL * to begin Checkout. * * Related guide: <a href="https://stripe.com/docs/checkout/quickstart">Checkout quickstart</a> * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|\Stripe\StripeObject $after_expiration When set, provides configuration for actions to take if this Checkout Session expires. * @property null|bool $allow_promotion_codes Enables user redeemable promotion codes. * @property null|int $amount_subtotal Total of all items before discounts or taxes are applied. * @property null|int $amount_total Total of all items after discounts and taxes are applied. * @property \Stripe\StripeObject $automatic_tax * @property null|string $billing_address_collection Describes whether Checkout should collect the customer's billing address. * @property null|string $cancel_url If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. * @property null|string $client_reference_id A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems. * @property null|string $client_secret Client secret to be used when initializing Stripe.js embedded checkout. * @property null|\Stripe\StripeObject $consent Results of <code>consent_collection</code> for this session. * @property null|\Stripe\StripeObject $consent_collection When set, provides configuration for the Checkout Session to gather active consent from customers. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. * @property null|\Stripe\StripeObject $currency_conversion Currency conversion details for automatic currency conversion sessions * @property \Stripe\StripeObject[] $custom_fields Collect additional information from your customer using custom fields. Up to 2 fields are supported. * @property \Stripe\StripeObject $custom_text * @property null|string|\Stripe\Customer $customer The ID of the customer for this Session. For Checkout Sessions in <code>subscription</code> mode or Checkout Sessions with <code>customer_creation</code> set as <code>always</code> in <code>payment</code> mode, Checkout will create a new customer object based on information provided during the payment flow unless an existing customer was provided when the Session was created. * @property null|string $customer_creation Configure whether a Checkout Session creates a Customer when the Checkout Session completes. * @property null|\Stripe\StripeObject $customer_details The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in <code>setup</code> mode. * @property null|string $customer_email If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once the payment flow is complete, use the <code>customer</code> attribute. * @property int $expires_at The timestamp at which the Checkout Session will expire. * @property null|string|\Stripe\Invoice $invoice ID of the invoice created by the Checkout Session, if it exists. * @property null|\Stripe\StripeObject $invoice_creation Details on the state of invoice creation for the Checkout Session. * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items The line items purchased by the customer. * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. * @property null|string $locale The IETF language tag of the locale Checkout is displayed in. If blank or <code>auto</code>, the browser's locale is used. * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $mode The mode of the Checkout Session. * @property null|string|\Stripe\PaymentIntent $payment_intent The ID of the PaymentIntent for Checkout Sessions in <code>payment</code> mode. * @property null|string|\Stripe\PaymentLink $payment_link The ID of the Payment Link that created this Session. * @property null|string $payment_method_collection Configure whether a Checkout Session should collect a payment method. * @property null|\Stripe\StripeObject $payment_method_configuration_details Information about the payment method configuration used for this Checkout session if using dynamic payment methods. * @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. * @property string[] $payment_method_types A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept. * @property string $payment_status The payment status of the Checkout Session, one of <code>paid</code>, <code>unpaid</code>, or <code>no_payment_required</code>. You can use this value to decide when to fulfill your customer's order. * @property null|\Stripe\StripeObject $phone_number_collection * @property null|string $recovered_from The ID of the original expired Checkout Session that triggered the recovery flow. * @property null|string $redirect_on_completion Applies to Checkout Sessions with <code>ui_mode: embedded</code>. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set <code>redirect_on_completion: 'if_required'</code>, then we will only redirect if your user chooses a redirect-based payment method. * @property null|string $return_url Applies to Checkout Sessions with <code>ui_mode: embedded</code>. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. * @property null|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in <code>setup</code> mode. * @property null|\Stripe\StripeObject $shipping_address_collection When set, provides configuration for Checkout to collect a shipping address from a customer. * @property null|\Stripe\StripeObject $shipping_cost The details of the customer cost of shipping, including the customer chosen ShippingRate. * @property null|\Stripe\StripeObject $shipping_details Shipping information for this Checkout Session. * @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to this Session. * @property null|string $status The status of the Checkout Session, one of <code>open</code>, <code>complete</code>, or <code>expired</code>. * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. <code>submit_type</code> can only be specified on Checkout Sessions in <code>payment</code> mode, but not Checkout Sessions in <code>subscription</code> or <code>setup</code> mode. * @property null|string|\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in <code>subscription</code> mode. * @property null|string $success_url The URL the customer will be directed to after the payment or subscription creation is successful. * @property null|\Stripe\StripeObject $tax_id_collection * @property null|\Stripe\StripeObject $total_details Tax and discount details for the computed total amount. * @property null|string $ui_mode The UI mode of the Session. Can be <code>hosted</code> (default) or <code>embedded</code>. * @property null|string $url The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using <a href="https://stripe.com/docs/payments/checkout/custom-domains">Custom Domains</a>, the URL will use your subdomain. Otherwise, it’ll use <code>checkout.stripe.com.</code> This value is only present when the session is active. */ class Session extends \Stripe\ApiResource { const OBJECT_NAME = 'checkout.session'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Create; use \Stripe\ApiOperations\Retrieve; const BILLING_ADDRESS_COLLECTION_AUTO = 'auto'; const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required'; const CUSTOMER_CREATION_ALWAYS = 'always'; const CUSTOMER_CREATION_IF_REQUIRED = 'if_required'; const MODE_PAYMENT = 'payment'; const MODE_SETUP = 'setup'; const MODE_SUBSCRIPTION = 'subscription'; const PAYMENT_METHOD_COLLECTION_ALWAYS = 'always'; const PAYMENT_METHOD_COLLECTION_IF_REQUIRED = 'if_required'; const PAYMENT_STATUS_NO_PAYMENT_REQUIRED = 'no_payment_required'; const PAYMENT_STATUS_PAID = 'paid'; const PAYMENT_STATUS_UNPAID = 'unpaid'; const REDIRECT_ON_COMPLETION_ALWAYS = 'always'; const REDIRECT_ON_COMPLETION_IF_REQUIRED = 'if_required'; const REDIRECT_ON_COMPLETION_NEVER = 'never'; const STATUS_COMPLETE = 'complete'; const STATUS_EXPIRED = 'expired'; const STATUS_OPEN = 'open'; const SUBMIT_TYPE_AUTO = 'auto'; const SUBMIT_TYPE_BOOK = 'book'; const SUBMIT_TYPE_DONATE = 'donate'; const SUBMIT_TYPE_PAY = 'pay'; const UI_MODE_EMBEDDED = 'embedded'; const UI_MODE_HOSTED = 'hosted'; /** * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Checkout\Session the expired session */ public function expire($params = null, $opts = null) { $url = $this->instanceUrl() . '/expire'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } /** * @param string $id * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Collection<\Stripe\LineItem> list of line items */ public static function allLineItems($id, $params = null, $opts = null) { $url = static::resourceUrl($id) . '/line_items'; list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; } } RazorpayController.php 0000644 00000012173 15111300251 0011121 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Repositories\OrderRepository; use Illuminate\Http\Request; use Razorpay\Api\Api; use Illuminate\Support\Facades\Session; class RazorpayController extends Controller { public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $data = PaymentGateway::whereKeyword('razorpay')->first(); $paydata = $data->convertAutoData(); $this->keyId = $paydata['key']; $this->keySecret = $paydata['secret']; $this->displayCurrency = 'INR'; $this->api = new Api($this->keyId, $this->keySecret); $this->orderRepositorty = $orderRepositorty; } public function store(Request $request) { if($request->currency_code != "INR") { return redirect()->back()->with('unsuccess','Please Select INR Currency For Rezorpay.'); } $settings = Generalsetting::findOrFail(1); $invest = Invest::findOrFail($request->invest_id); $item_name = $settings->title." Invest"; $order['item_name'] = $item_name; $order['item_number'] = $invest->transaction_no; $order['item_amount'] = round($request->amount,2); $cancel_url = route('api.checkout.razorpay.cancel'); $notify_url = route('api.checkout.razorpay.notify'); $orderData = [ 'receipt' => $order['item_number'], 'amount' => $order['item_amount'] * 100, 'currency' => 'INR', 'payment_capture' => 1 ]; $razorpayOrder = $this->api->order->create($orderData); $input['user_id'] = $request->user_id; Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); Session::put('order_data',$order); Session::put('order_payment_id', $razorpayOrder['id']); $displayAmount = $amount = $orderData['amount']; if ($this->displayCurrency !== 'INR') { $url = "https://api.fixer.io/latest?symbols=$this->displayCurrency&base=INR"; $exchange = json_decode(file_get_contents($url), true); $displayAmount = $exchange['rates'][$this->displayCurrency] * $amount / 100; } $checkout = 'automatic'; if (isset($_GET['checkout']) and in_array($_GET['checkout'], ['automatic', 'manual'], true)) { $checkout = $_GET['checkout']; } $data = [ "key" => $this->keyId, "amount" => $amount, "name" => $order['item_name'], "description" => $order['item_name'], "prefill" => [ "name" => $request->customer_name, "email" => $request->customer_email, "contact" => $request->customer_phone, ], "notes" => [ "address" => $request->customer_address, "merchant_order_id" => $order['item_number'], ], "theme" => [ "color" => "{{$settings->colors}}" ], "order_id" => $razorpayOrder['id'], ]; if ($this->displayCurrency !== 'INR') { $data['display_currency'] = $this->displayCurrency; $data['display_amount'] = $displayAmount; } $json = json_encode($data); $displayCurrency = $this->displayCurrency; return view( 'frontend.razorpay-checkout', compact( 'data','displayCurrency','json','notify_url' ) ); } public function notify(Request $request) { $input_data = $request->all(); $payment_id = Session::get('order_payment_id'); $input = Session::get('request_data'); $success = true; if (empty($input_data['razorpay_payment_id']) === false) { try { $attributes = array( 'razorpay_order_id' => $payment_id, 'razorpay_payment_id' => $input_data['razorpay_payment_id'], 'razorpay_signature' => $input_data['razorpay_signature'] ); $this->api->utility->verifyPaymentSignature($attributes); } catch(SignatureVerificationError $e) { $success = false; } } $method = Session::get('method'); $invest_id = Session::get('invest_id'); if ($success === true){ $invest = Invest::findOrFail($invest_id); $addionalData = ['txnid' => $payment_id, 'status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Payment Cancelled!'); } } BlockIoController.php 0000644 00000013275 15111300251 0010640 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App; use URL; use Auth; use Hash; use Config; use Session; use Redirect; use Validator; use Carbon\Carbon; use App\Models\User; use App\Models\Order; use App\Classes\BlockIO; use App\Models\Transaction; use App\Models\Notification; use Illuminate\Http\Request; use App\Classes\GeniusMailer; use App\Models\Generalsetting; use App\Classes\CoinPaymentsAPI; use App\Models\UserNotification; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Invest; use Illuminate\Support\Facades\Input; use App\Models\PaymentGateway; use App\Models\Plan; use Illuminate\Support\Carbon as IlluminateCarbon; use Illuminate\Support\Facades\Session as FacadesSession; use Illuminate\Support\Str; class BlockIoController extends Controller { public function blockioInvest() { return view('user.invest.blockio'); } public function blockiocallback(Request $request) { $notifyID = $request['notification_id']; $amountRec = $request['data']['amount_received']; if (Invest::where('notify_id',$notifyID)->exists()){ $order = Invest::where('notify_id',$notifyID)->where('payment_status','pending')->first(); $data['txnid'] = $request['data']['txid']; $data['payment_status'] = "completed"; $order->update($data); $trans = new Transaction(); $trans->email = auth()->user()->email; $trans->amount = $order->amount; $trans->type = "Invest"; $trans->txnid = $order->transaction_no; $trans->user_id = $order->user_id; $trans->save(); $gs = Generalsetting::findOrFail(1); $user = User::whereId($order->user_id)->first(); if($gs->is_smtp == 1) { $data = [ 'to' => $user->email, 'type' => "Invest", 'cname' => $user->name, 'oamount' => $order->amount, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $order->customer_email; $subject = " You have invested successfully."; $msg = "Hello ".$order->customer_name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } } } function curlGetCall($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPGET, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $data = curl_exec ($ch); curl_close ($ch); return $data; } public function deposit(Request $request) { $invest = Invest::findOrFail($request->invest_id); $user = User::findOrFail($invest->user_id); if($request->amount > 0){ $methods = $request->method; $version = 2; $coin = "BTC"; $my_api_key = ''; if($methods == "block.io.ltc"){ $blockinfo = PaymentGateway::whereKeyword('block.io.ltc')->first(); $blocksettings= $blockinfo->convertAutoData(); $coin = "Litecoin"; $my_api_key = $blocksettings['blockio_api_ltc']; }elseif($methods == "block.io.btc"){ $blockinfo = PaymentGateway::whereKeyword('block.io.btc')->first(); $blocksettings= $blockinfo->convertAutoData(); $coin = "Bitcoin"; $my_api_key = $blocksettings['blockio_api_btc']; }elseif ($methods == "block.io.dgc"){ $coin = "Dogecoin"; $blockinfo = PaymentGateway::whereKeyword('block.io.dgc')->first(); $blocksettings= $blockinfo->convertAutoData(); $my_api_key = $blocksettings['blockio_api_dgc']; } $acc = Auth::user()->id; $item_number = $invest->transaction_no; $item_amount = $request->amount; $currency_code = $request->currency_code; $secret = $blocksettings['secret_string']; $my_callback_url = route('api.checkout.blockio.notify'); $block_io = new BlockIO($my_api_key, $secret, $version); $biorate = 1; $coin_amount = round($item_amount / $biorate, 8); $root_url = 'https://block.io/api/v2/'; $addObject = $block_io->get_new_address(array()); $address = $addObject->data->address; $notifyObject = $block_io->create_notification(array('type' => 'address', 'address' => $address, 'url' => $my_callback_url)); $notifyID = $notifyObject->data->notification_id; $invest->method = $request->method; $invest->coin_amount = $coin_amount; $invest->notify_id = $notifyID; $invest->update(); $qrcode_url = "https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=bitcoin:".$address."?amount=".$coin_amount."&choe=UTF-8"; return redirect()->route('api.user.invest.checkout',$invest->id)->with('success',['address' => $address,'qrcode_url' => $qrcode_url,]); } return redirect()->route('api.user.invest.checkout',$invest->id)->with('error','Please enter a valid amount.')->withInput(); } } ManualController.php 0000644 00000015644 15111300251 0010535 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Generalsetting; use PHPMailer\PHPMailer\PHPMailer; use App\Models\Invest; use App\Models\User; use App\Repositories\OrderRepository; use Illuminate\Http\Request; class ManualController extends Controller { public $gs; public function __construct(OrderRepository $orderRepositorty) { $this->gs = Generalsetting::findOrFail(1); $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ $invest_id = $request->invest_id; $invest = Invest::findOrFail($invest_id); $this->orderRepositorty->apiOrder($request,$invest); $user = User::whereId($invest->user_id)->first(); $to = $user->email; $subject = 'Your Investment is Being Processed'; $msg = '<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Your Investment is Being Processed</title> <style> body { margin: 0; padding: 0; font-family: "Arial", sans-serif; background-color: #f7f7f7; } .email-wrapper { width: 100%; background-color: #f7f7f7; padding: 20px 0; } .email-content { width: 100%; max-width: 600px; background-color: #ffffff; border-radius: 8px; margin: 0 auto; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } .email-header { background-color: #003366; padding: 20px; text-align: center; border-radius: 8px 8px 0 0; } .email-header img { max-width: 200px; } .email-header span { font-size: 18px; font-weight: 600; color: #00BFFF; display: block; margin-top: 10px; } .email-body { padding: 16px 30px; font-size: 16px; line-height: 1.5; color: #333; } .email-body h3 { color: #003366; margin-bottom: 15px; } .email-body p { margin-bottom: 20px; } .email-button { display: inline-block; background-color: #003366; color: #ffffff !important; padding: 6px 12px; font-size: 16px; border-radius: 5px; text-decoration: none; } .email-footer { background-color: #1f1f1f; color: #ffffff; text-align: center; padding: 12px; border-radius: 0 0 8px 8px; font-size: 14px; } .email-footer a { color: #00BFFF; text-decoration: none; } </style> </head> <body> <div class="email-wrapper"> <div class="email-content"> <div class="email-header"> <img src="https://fluxeassets.com/imgx/etemp.png" alt="Fluxe Assets Logo"> <span>Guiding You Toward Financial Growth</span> </div> <div class="email-body"> <p>Dear <strong>'.$user->name.'</strong>,</p> <p>Thank you for choosing an investment plan with <strong>Fluxe Assets</strong>.</p> <p>Your investment is currently being processed. Once confirmed, profits will begin accruing based on your selected plan.</p> <p>You can view your investment status and details anytime in your dashboard:</p> <a href="https://fluxeassets.com/user/login" class="email-button" target="_blank">Access Your Dashboard</a> <p style="margin-top: 30px;">Thank you for your trust in us.<br>The Fluxe Assets Team</p> </div> <div class="email-footer"> <p>Copyright © 2025 <a href="https://fluxeassets.com">Fluxe Assets</a>. All rights reserved.</p> </div> </div> </div> </body> </html>'; if($this->gs->is_smtp == 1) { $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = $this->gs->smtp_host; $mail->SMTPAuth = true; $mail->Username = $this->gs->smtp_user; $mail->Password = $this->gs->smtp_pass; if ($this->gs->smtp_encryption == 'ssl') { $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; } else { $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; } $mail->Port = $this->gs->smtp_port; $mail->CharSet = 'UTF-8'; $mail->setFrom($this->gs->from_email, $this->gs->from_name); $mail->addAddress($user->email, $user->name); $mail->addReplyTo($this->gs->from_email, $this->gs->from_name); $mail->isHTML(true); $mail->Subject = $subject; $mail->Body = $msg; $mail->send(); } catch (Exception $e) { } } else { $headers = "From: ".$this->gs->from_name."<".$this->gs->from_email.">"; mail($to,$subject,$msg,$headers); } return redirect()->back()->with('message','Invest successfully complete.'); } } MollieController.php 0000644 00000006306 15111300251 0010534 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Invest; use Session; use Auth; use Str; use Illuminate\Http\Request; use Mollie\Laravel\Facades\Mollie; use App\Repositories\OrderRepository; class MollieController extends Controller { public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ $invest = Invest::findOrFail($request->invest_id); $support = [ 'AED', 'AUD', 'BGN', 'BRL', 'CAD', 'CHF', 'CZK', 'DKK', 'EUR', 'GBP', 'HKD', 'HRK', 'HUF', 'ILS', 'ISK', 'JPY', 'MXN', 'MYR', 'NOK', 'NZD', 'PHP', 'PLN', 'RON', 'RUB', 'SEK', 'SGD', 'THB', 'TWD', 'USD', 'ZAR' ]; if(!in_array($request->currency_code,$support)){ return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Please Select USD Or EUR Currency For Paypal.'); } $item_amount = $request->amount; $input = $request->all(); $item_name = "Deposit via Molly Payment"; $payment = Mollie::api()->payments()->create([ 'amount' => [ 'currency' => $request->currency_code, 'value' => ''.sprintf('%0.2f', $item_amount).'', ], 'description' => $item_name , 'redirectUrl' => route('api.checkout.molly.notify'), ]); Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); Session::put('molly_data',$input); Session::put('payment_id',$payment->id); $payment = Mollie::api()->payments()->get($payment->id); return redirect($payment->getCheckoutUrl(), 303); } public function notify(Request $request){ $input = Session::get('molly_data'); $item_number = Str::random(4).time(); $payment = Mollie::api()->payments()->get(Session::get('payment_id')); dd($payment); $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); if($payment->status == 'paid'){ $addionalData = ['status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); Session::forget('molly_data'); Session::forget('method'); Session::forget('invest_id'); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Something went wrong!'); } return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Something went wrong!'); } } CoinPaymentController.php 0000644 00000015372 15111300251 0011544 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Classes\CoinPaymentsAPI; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Models\Plan; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; class CoinPaymentController extends Controller { public function blockInvest() { return view('user.coinpay'); } public function coinCallback(Request $request) { Session::put('check_txn',$request->all()); $blockinfo = PaymentGateway::whereKeyword('coinPayment')->first(); $blocksettings= $blockinfo->convertAutoData(); $real_secret = $blocksettings['secret_string']; $trans_id = $request->custom; $status = $request->status; $amount2 = floatval($request->amount2); $currency2 = $request->currency2; $getSec = Input::get('secret'); if ($real_secret == $getSec){ if (Order::where('order_number',$trans_id)->exists()){ $order = Order::where('order_number',$trans_id)->where('payment_status','pending')->first(); if ($status >= 100 || $status == 2) { if ($currency2 == "BTC" && $order->coin_amount <= $amount2) { $data['payment_status'] = "completed"; $order->update($data); $notification = new Notification; $notification->order_id = $order->id; $notification->save(); $trans = new Transaction; $trans->email = $order->customer_email; $trans->amount = $order->invest; $trans->type = "Invest"; $trans->txnid = $order->order_number; $trans->user_id = $order->user_id; $trans->save(); $notf = new UserNotification; $notf->user_id = $order->user_id; $notf->order_id = $order->id; $notf->type = "Invest"; $notf->save(); $gs = Generalsetting::findOrFail(1); if($gs->is_affilate == 1) { $user = User::find($order->user_id); if ($user->referral_id != 0) { $val = $order->invest / 100; $sub = $val * $gs->affilate_charge; $sub = round($sub,2); $ref = User::find($user->referral_id); if(isset($ref)) { $ref->income += $sub; $ref->update(); $trans = new Transaction; $trans->email = $ref->email; $trans->amount = $sub; $trans->type = "Referral Bonus"; $trans->txnid = $order->order_number; $trans->user_id = $ref->id; $trans->save(); } } } if($gs->is_smtp == 1) { $data = [ 'to' => $order->customer_email, 'type' => "Invest", 'cname' => $order->customer_name, 'oamount' => $order->order_number, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $order->customer_email; $subject = " You have invested successfully."; $msg = "Hello ".$order->customer_name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } } } } } } public function deposit(Request $request) { $invest = Invest::findOrFail($request->invest_id); $user = User::findOrFail($invest->user_id); $generalsettings = Generalsetting::findOrFail(1); $blockinfo = PaymentGateway::whereKeyword('coinPayment')->first(); $blocksettings= $blockinfo->convertAutoData(); if($request->amount > 0){ $acc =$user; $item_number = $invest->transaction_no; $item_amount = $request->amount; $currency_code = $request->currency_code; $public_key =$blocksettings['public_key']; $private_key = $blocksettings['private_key']; $req['version'] = 1; $req['cmd'] = "get_callback_address"; $req['currency'] = $request->currency_code; $req['ipn_url'] = route('api.checkout.coinpay.notify'); $req['key'] = $public_key; $req['format'] = 'json'; $post_data = http_build_query($req, '', '&'); $hmac = hash_hmac('sha512', $post_data, $private_key); $ch = curl_init('https://www.coinpayments.net/api.php'); curl_setopt($ch, CURLOPT_FAILONERROR, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array('HMAC: '.$hmac)); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); $data = json_decode(curl_exec($ch)); $invest->method = $request->method; $invest->notify_id = $data->result->address; $invest->update(); return redirect()->route('api.user.invest.checkout',$invest->id)->with('success',$data->result->address); }else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess', 'Something went wrong'); } } } PaypalController.php 0000644 00000012017 15111300251 0010535 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use PayPal\{ Api\Item, Api\Payer, Api\Amount, Api\Payment, Api\ItemList, Rest\ApiContext, Api\Transaction, Api\RedirectUrls, Api\PaymentExecution, Auth\OAuthTokenCredential }; use Illuminate\Support\Facades\Redirect; use Illuminate\Support\Facades\Session; use App\Repositories\OrderRepository; use Illuminate\Http\Request; class PaypalController extends Controller { private $_api_context; public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $data = PaymentGateway::whereKeyword('paypal')->first(); $paydata = $data->convertAutoData(); $paypal_conf = \Config::get('paypal'); $paypal_conf['client_id'] = $paydata['client_id']; $paypal_conf['secret'] = $paydata['client_secret']; $paypal_conf['settings']['mode'] = $paydata['sandbox_check'] == 1 ? 'sandbox' : 'live'; $this->_api_context = new ApiContext(new OAuthTokenCredential( $paypal_conf['client_id'], $paypal_conf['secret']) ); $this->_api_context->setConfig($paypal_conf['settings']); $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ $cancel_url = route('api.checkout.paypal.cancel'); $notify_url = route('api.checkout.paypal.notify'); $gs = Generalsetting::findOrFail(1); $item_name = $gs->title." Invest"; $item_amount = $request->amount; $invest = Invest::findOrFail($request->invest_id); $support = ['USD','EUR']; if(!in_array($request->currency_code,$support)){ return redirect()->back()->with('warning','Please Select USD Or EUR Currency For Paypal.'); } $payer = new Payer(); $payer->setPaymentMethod('paypal'); $item_1 = new Item(); $item_1->setName($item_name) ->setCurrency('USD') ->setQuantity(1) ->setPrice($item_amount); $item_list = new ItemList(); $item_list->setItems(array($item_1)); $amount = new Amount(); $amount->setCurrency('USD') ->setTotal($item_amount); $transaction = new Transaction(); $transaction->setAmount($amount) ->setItemList($item_list) ->setDescription($item_name.' Via Paypal'); $redirect_urls = new RedirectUrls(); $redirect_urls->setReturnUrl($notify_url) ->setCancelUrl($cancel_url); $payment = new Payment(); $payment->setIntent('Sale') ->setPayer($payer) ->setRedirectUrls($redirect_urls) ->setTransactions(array($transaction)); try { $payment->create($this->_api_context); } catch (\PayPal\Exception\PPConnectionException $ex) { return redirect()->back()->with('unsuccess',$ex->getMessage()); } foreach ($payment->getLinks() as $link) { if ($link->getRel() == 'approval_url') { $redirect_url = $link->getHref(); break; } } Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); Session::put('paypal_payment_id', $payment->getId()); if (isset($redirect_url)) { return Redirect::away($redirect_url); } return redirect()->back()->with('unsuccess','Unknown error occurred'); if (isset($redirect_url)) { return Redirect::away($redirect_url); } return redirect()->back()->with('unsuccess','Unknown error occurred'); } public function notify(Request $request) { $payment_id = Session::get('paypal_payment_id'); if (empty( $request['PayerID']) || empty( $request['token'])) { return redirect()->back()->with('error', 'Payment Failed'); } $payment = Payment::get($request->paymentId, $this->_api_context); $execution = new PaymentExecution(); $execution->setPayerId($request['PayerID']); $method = Session::get('method'); $invest_id = Session::get('invest_id'); $result = $payment->execute($execution, $this->_api_context); if ($result->getState() == 'approved') { $resp = json_decode($payment, true); $addionalData = ['charge_id'=>$resp['transactions'][0]['related_resources'][0]['sale']['id'],'status'=>'running','method'=>$method]; $invest = Invest::findOrFail($invest_id); $this->orderRepositorty->apiOrder($request,$invest,$addionalData); Session::forget('method'); Session::forget('invest_id'); Session::forget('paypal_payment_id'); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } } public function cancel(){ return back(); } } AuthorizeController.php 0000644 00000011067 15111300251 0011265 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use Illuminate\Support\Str; use Illuminate\Http\Request; use App\Models\PaymentGateway; use App\Models\Generalsetting; use App\Models\Invest; use App\Repositories\OrderRepository; use Illuminate\Support\Facades\Validator; use net\authorize\api\contract\v1 as AnetAPI; use net\authorize\api\controller as AnetController; class AuthorizeController extends Controller { public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ $support = ['USD']; if(!in_array($request->currency_code,$support)){ return redirect()->back()->with('warning','Please Select USD Currency For Authorize.'); } $settings = Generalsetting::find(1); $authorizeinfo = PaymentGateway::whereKeyword('authorize.net')->first(); $authorizesettings= $authorizeinfo->convertAutoData(); $invest = Invest::findOrFail($request->invest_id); $item_name = $settings->title." Order"; $item_number = $invest->transaction_no; $item_amount = $request->amount; $validator = Validator::make($request->all(),[ 'cardNumber' => 'required', 'cardCVC' => 'required', 'month' => 'required', 'year' => 'required', ]); if ($validator->passes()) { $merchantAuthentication = new AnetAPI\MerchantAuthenticationType(); $merchantAuthentication->setName($authorizesettings['login_id']); $merchantAuthentication->setTransactionKey($authorizesettings['txn_key']); $refId = 'ref' . time(); $creditCard = new AnetAPI\CreditCardType(); $creditCard->setCardNumber(str_replace(' ','',$request->cardNumber)); $year = $request->year; $month = $request->month; $creditCard->setExpirationDate($year.'-'.$month); $creditCard->setCardCode($request->cardCVC); $paymentOne = new AnetAPI\PaymentType(); $paymentOne->setCreditCard($creditCard); $orderr = new AnetAPI\OrderType(); $orderr->setInvoiceNumber($item_number); $orderr->setDescription($item_name); $transactionRequestType = new AnetAPI\TransactionRequestType(); $transactionRequestType->setTransactionType("authCaptureTransaction"); $transactionRequestType->setAmount($item_amount); $transactionRequestType->setOrder($orderr); $transactionRequestType->setPayment($paymentOne); $requestt = new AnetAPI\CreateTransactionRequest(); $requestt->setMerchantAuthentication($merchantAuthentication); $requestt->setRefId($refId); $requestt->setTransactionRequest($transactionRequestType); $controller = new AnetController\CreateTransactionController($requestt); if($authorizesettings['sandbox_check'] == 1){ $response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX); } else { $response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::PRODUCTION); } if ($response != null) { if ($response->getMessages()->getResultCode() == "Ok") { $tresponse = $response->getTransactionResponse(); if ($tresponse != null && $tresponse->getMessages() != null) { $addionalData = ['txnid'=>$tresponse->getTransId(), 'status'=>'running', 'method' => $request->method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest Successfully Complete.'); } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning', 'Payment Failed.'); } } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning', 'Payment Failed.'); } } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning', 'Payment Failed.'); } } return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning', 'Invalid Payment Details.'); } } CoinGateController.php 0000644 00000013732 15111300251 0011005 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Classes\GeniusMailer; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Models\Plan; use App\Models\Transaction; use App\Models\User; use CoinGate\CoinGate; use Illuminate\Http\Request; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; class CoinGateController extends Controller { public function coingetCallback(Request $request) { $trans_id = $request->order_id; if ($request->status == 'paid') { if (Invest::where('transaction_no',$trans_id)->where('payment_status','pending')->exists()){ $deposits = $request->receive_amount; $order = Invest::where('transaction_no',$trans_id)->where('payment_status','pending')->first(); $data['coin_amount'] = $request->pay_amount; $data['status'] = 1; $data['payment_status'] = "completed"; $data['txnid'] = $request->token; $order->update($data); $user = User::whereId($order->user_id)->first(); $trans = new Transaction(); $trans->email = $user->email; $trans->amount = $order->amount; $trans->type = "Invest"; $trans->txnid = $order->transaction_no; $trans->user_id = $order->user_id; $trans->save(); $gs = Generalsetting::findOrFail(1); if($gs->is_affilate == 1) { $user = User::find($order->user_id); if ($user->referral_id != 0) { $val = $order->invest / 100; $sub = $val * $gs->affilate_charge; $sub = round($sub,2); $ref = User::find($user->referral_id); if(isset($ref)) { $ref->income += $sub; $ref->update(); $trans = new Transaction; $trans->email = $ref->email; $trans->amount = $sub; $trans->type = "Referral Bonus"; $trans->txnid = $order->order_number; $trans->user_id = $ref->id; $trans->save(); } } } if($gs->is_smtp == 1) { $data = [ 'to' => $order->customer_email, 'type' => "Invest", 'cname' => $order->customer_name, 'oamount' => $order->order_number, 'aname' => "", 'aemail' => "", 'wtitle' => "", ]; $mailer = new GeniusMailer(); $mailer->sendAutoMail($data); } else { $to = $order->customer_email; $subject = " You have invested successfully."; $msg = "Hello ".$order->customer_name."!\nYou have invested successfully.\nThank you."; $headers = "From: ".$gs->from_name."<".$gs->from_email.">"; mail($to,$subject,$msg,$headers); } // return "*ok*"; } } } public function deposit(Request $request) { $invest = Invest::findOrFail($request->invest_id); $user = User::findOrFail($invest->user_id); $generalsettings = Generalsetting::findOrFail(1); $blockinfo = PaymentGateway::whereKeyword('coingate')->first(); $blocksettings= $blockinfo->convertAutoData(); if($request->amount > 0){ $acc = $user; $item_number = $invest->transaction_no; $item_amount = $request->amount; $currency_code = $request->currency_code; $item_name = $generalsettings->title." Invest"; $my_callback_url = route('api.checkout.coingate.notify'); $return_url = route('api.user.invest.checkout',$invest->id); $cancel_url = route('api.user.invest.checkout',$invest->id); CoinGate::config(array( 'environment' => 'sandbox', // sandbox OR live 'auth_token' => $blocksettings['secret_string'] )); $post_params = array( 'order_id' => $item_number, 'price_amount' => $item_amount, 'price_currency' => $currency_code, 'receive_currency' => $currency_code, 'callback_url' => $my_callback_url, 'cancel_url' => $cancel_url, 'success_url' => $return_url, 'title' => $item_name, 'description' => 'Invest' ); $coinGate = \CoinGate\Merchant\Order::create($post_params); if ($coinGate) { $invest->method = $request->method; $invest->update(); return redirect($coinGate->payment_url); } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','Some Problem Occurrs! Please Try Again'); } } return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','Please enter a valid amount.')->withInput(); } } error_log 0000644 00000026267 15111300251 0006463 0 ustar 00 [25-Nov-2025 18:00:40 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/StripeController.php:20 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/StripeController.php on line 20 [25-Nov-2025 18:02:12 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/MercadopagoController.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/MercadopagoController.php on line 19 [25-Nov-2025 18:46:12 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/CoinPaymentController.php:18 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/CoinPaymentController.php on line 18 [25-Nov-2025 19:52:16 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/CoinGateController.php:20 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/CoinGateController.php on line 20 [25-Nov-2025 19:56:32 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PaytmController.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PaytmController.php on line 15 [25-Nov-2025 19:57:58 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/ManualController.php:13 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/ManualController.php on line 13 [25-Nov-2025 20:00:45 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/RazorpayController.php:14 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/RazorpayController.php on line 14 [25-Nov-2025 20:04:04 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PerfectMoneyController.php:17 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PerfectMoneyController.php on line 17 [25-Nov-2025 20:04:19 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/AuthorizeController.php:16 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/AuthorizeController.php on line 16 [25-Nov-2025 20:22:09 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/SkrillController.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/SkrillController.php on line 15 [25-Nov-2025 20:22:13 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/MollieController.php:14 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/MollieController.php on line 14 [25-Nov-2025 20:23:18 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PayeerController.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PayeerController.php on line 15 [25-Nov-2025 20:24:04 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/FlutterwaveController.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/FlutterwaveController.php on line 15 [25-Nov-2025 20:25:04 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PaypalController.php:26 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PaypalController.php on line 26 [25-Nov-2025 21:36:36 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/InstamojoController.php:17 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/InstamojoController.php on line 17 [25-Nov-2025 21:59:54 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PaystackController.php:12 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PaystackController.php on line 12 [25-Nov-2025 22:04:27 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/BlockIoController.php:34 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/BlockIoController.php on line 34 [26-Nov-2025 17:09:26 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/FlutterwaveController.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/FlutterwaveController.php on line 15 [26-Nov-2025 17:10:48 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PaytmController.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PaytmController.php on line 15 [26-Nov-2025 17:12:46 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/ManualController.php:13 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/ManualController.php on line 13 [26-Nov-2025 17:31:58 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/CoinGateController.php:20 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/CoinGateController.php on line 20 [26-Nov-2025 17:32:36 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/RazorpayController.php:14 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/RazorpayController.php on line 14 [26-Nov-2025 17:36:42 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/CoinPaymentController.php:18 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/CoinPaymentController.php on line 18 [26-Nov-2025 17:38:05 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/MollieController.php:14 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/MollieController.php on line 14 [26-Nov-2025 18:43:34 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PayeerController.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PayeerController.php on line 15 [26-Nov-2025 18:46:29 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/AuthorizeController.php:16 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/AuthorizeController.php on line 16 [26-Nov-2025 18:47:15 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/InstamojoController.php:17 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/InstamojoController.php on line 17 [26-Nov-2025 19:06:23 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/BlockIoController.php:34 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/BlockIoController.php on line 34 [26-Nov-2025 19:08:26 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/StripeController.php:20 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/StripeController.php on line 20 [26-Nov-2025 19:36:54 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PerfectMoneyController.php:17 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PerfectMoneyController.php on line 17 [26-Nov-2025 19:43:11 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/MercadopagoController.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/MercadopagoController.php on line 19 [26-Nov-2025 19:46:19 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/SkrillController.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/SkrillController.php on line 15 [26-Nov-2025 19:46:23 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PaypalController.php:26 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Http/Controllers/Api/Checkout/PaypalController.php on line 26 SkrillController.php 0000644 00000005273 15111300251 0010555 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Repositories\OrderRepository; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class SkrillController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; $this->payment = PaymentGateway::whereKeyword('skrill')->first(); $this->paydata = $this->payment->convertAutoData(); } public function store(Request $request){ $gs = Generalsetting::findOrFail(1); $invest_name = $gs->title." Invest"; $invest_number = Str::random(4).time(); $invest = Invest::findOrFail($request->invest_id); Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); $info['pay_to_email'] = trim($this->paydata['email']); $info['transaction_id'] = $invest->transaction_no; $info['status_url'] = route('api.checkout.skrill.notify'); $info['language'] = 'EN'; $info['amount'] = round($request->amount,2); $info['currency'] = $request->currency_code; $info['detail1_description'] = $gs->title; $info['detail1_text'] = "Pay To ".$gs->title; $data['info'] = $info; $data['method'] = "POST"; $data['url'] = "https://pay.skrill.com"; return view('payment.redirect',compact('data')); } public function notify(Request $request){ $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); $concatFields = $request->merchant_id . $request->transaction_id . strtoupper(md5(trim($this->paydata['secret']))) . $request->mb_amount . $request->mb_currency . $request->status; if (strtoupper(md5($concatFields)) == $request->md5sig && $request->pay_to_email == trim($this->paydata['email']) && $invest->status = '0') { $addionalData = ['status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); }else{ return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','Something went wrong!'); } } } PaystackController.php 0000644 00000002052 15111300251 0011064 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\Generalsetting; use App\Models\Invest; use App\Repositories\OrderRepository; use Illuminate\Support\Str; class PaystackController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ if($request->currency_code != "NGN") { return redirect()->back()->with('unsuccess','Please Select NGN Currency For Paystack.'); } $invest = Invest::findOrFail($request->invest_id); $addionalData = ['txnid'=>$request->paystack_txn, 'status'=>'running', 'method' => $request->method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } } StripeController.php 0000644 00000006670 15111300251 0010565 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use Cartalyst\Stripe\Laravel\Facades\Stripe; use App\Repositories\OrderRepository; use App\Http\Controllers\Controller; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use Illuminate\Http\Request; use Illuminate\Support\Str; use App\Models\Transaction; use App\Models\Referral; use App\Models\User; use Carbon\Carbon; use Validator; use Config; class StripeController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(OrderRepository $orderRepositorty) { $data = PaymentGateway::whereKeyword('Stripe')->first(); $paydata = $data->convertAutoData(); Config::set('services.stripe.key', $paydata['key']); Config::set('services.stripe.secret', $paydata['secret']); $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ $gs = Generalsetting::findOrFail(1); $item_name = $gs->title." Invest"; $item_number = Str::random(4).time(); $item_amount = $request->amount; $invest_id = $request->invest_id; $support = ['USD']; if(!in_array($request->currency_code,$support)){ return redirect()->back()->with('warning','Please Select USD Currency For Stripe.'); } $validator = Validator::make($request->all(),[ 'cardNumber' => 'required', 'cardCVC' => 'required', 'month' => 'required', 'year' => 'required', ]); if ($validator->passes()) { $stripe = Stripe::make(Config::get('services.stripe.secret')); try{ $token = $stripe->tokens()->create([ 'card' =>[ 'number' => $request->cardNumber, 'exp_month' => $request->month, 'exp_year' => $request->year, 'cvc' => $request->cardCVC, ], ]); if (!isset($token['id'])) { return back()->with('error','Token Problem With Your Token.'); } $charge = $stripe->charges()->create([ 'card' => $token['id'], 'currency' => $request->currency_code, 'amount' => $item_amount, 'description' => $item_name, ]); if ($charge['status'] == 'succeeded') { $addionalData = ['txnid'=>$charge['balance_transaction'],'charge_id'=>$charge['id'],'status'=>'running']; $invest = Invest::findOrFail($invest_id); $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return back()->with('success','Invest successfully complete.'); } }catch (Exception $e){ return back()->with('unsuccess', $e->getMessage()); }catch (\Cartalyst\Stripe\Exception\CardErrorException $e){ return back()->with('unsuccess', $e->getMessage()); }catch (\Cartalyst\Stripe\Exception\MissingParameterException $e){ return back()->with('unsuccess', $e->getMessage()); } } return back()->with('warning', 'Please Enter Valid Credit Card Informations.'); } } PaytmController.php 0000644 00000031765 15111300251 0010414 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Repositories\OrderRepository; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use Illuminate\Support\Str; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; class PaytmController extends Controller { public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ if($request->currency_code != "INR") { return redirect()->back()->with('unsuccess','Please Select INR Currency For Paytm.'); } $settings = Generalsetting::findOrFail(1); $invest = Invest::findOrFail($request->invest_id); $item_name = $settings->title." Invest"; $item_number = $invest->transaction_no; $item_amount = $request->amount; Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); $data_for_request = $this->handlePaytmRequest( $item_number, $item_amount ); $paytm_txn_url = 'https://securegw-stage.paytm.in/theia/processTransaction'; $paramList = $data_for_request['paramList']; $checkSum = $data_for_request['checkSum']; return view( 'frontend.paytm-merchant-form', compact( 'paytm_txn_url', 'paramList', 'checkSum' ) ); } public function handlePaytmRequest( $transaction_id, $amount) { $gs = Generalsetting::first(); $data = PaymentGateway::whereKeyword('Paytm')->first(); $paydata = $data->convertAutoData(); $this->getAllEncdecFunc(); $checkSum = ""; $paramList = array(); $paramList["MID"] = $paydata['merchant']; $paramList["ORDER_ID"] = $transaction_id; $paramList["CUST_ID"] = $transaction_id; $paramList["INDUSTRY_TYPE_ID"] = $paydata['industry']; $paramList["CHANNEL_ID"] = 'WEB'; $paramList["TXN_AMOUNT"] = $amount; $paramList["WEBSITE"] = $paydata['website']; $paramList["CALLBACK_URL"] = route('api.checkout.paytm.notify'); $paytm_merchant_key = $paydata['secret']; $checkSum = getChecksumFromArray( $paramList, $paytm_merchant_key ); return array( 'checkSum' => $checkSum, 'paramList' => $paramList ); } function getAllEncdecFunc() { function encrypt_e($input, $ky) { $key = html_entity_decode($ky); $iv = "@@@@&&&&####$$$$"; $data = openssl_encrypt ( $input , "AES-128-CBC" , $key, 0, $iv ); return $data; } function decrypt_e($crypt, $ky) { $key = html_entity_decode($ky); $iv = "@@@@&&&&####$$$$"; $data = openssl_decrypt ( $crypt , "AES-128-CBC" , $key, 0, $iv ); return $data; } function pkcs5_pad_e($text, $blocksize) { $pad = $blocksize - (strlen($text) % $blocksize); return $text . str_repeat(chr($pad), $pad); } function pkcs5_unpad_e($text) { $pad = ord($text(strlen($text) - 1)); if ($pad > strlen($text)) return false; return substr($text, 0, -1 * $pad); } function generateSalt_e($length) { $random = ""; srand((double) microtime() * 1000000); $data = "AbcDE123IJKLMN67QRSTUVWXYZ"; $data .= "aBCdefghijklmn123opq45rs67tuv89wxyz"; $data .= "0FGH45OP89"; for ($i = 0; $i < $length; $i++) { $random .= substr($data, (rand() % (strlen($data))), 1); } return $random; } function checkString_e($value) { if ($value == 'null') $value = ''; return $value; } function getChecksumFromArray($arrayList, $key, $sort=1) { if ($sort != 0) { ksort($arrayList); } $str = getArray2Str($arrayList); $salt = generateSalt_e(4); $finalString = $str . "|" . $salt; $hash = hash("sha256", $finalString); $hashString = $hash . $salt; $checksum = encrypt_e($hashString, $key); return $checksum; } function getChecksumFromString($str, $key) { $salt = generateSalt_e(4); $finalString = $str . "|" . $salt; $hash = hash("sha256", $finalString); $hashString = $hash . $salt; $checksum = encrypt_e($hashString, $key); return $checksum; } function verifychecksum_e($arrayList, $key, $checksumvalue) { $arrayList = removeCheckSumParam($arrayList); ksort($arrayList); $str = getArray2StrForVerify($arrayList); $paytm_hash = decrypt_e($checksumvalue, $key); $salt = substr($paytm_hash, -4); $finalString = $str . "|" . $salt; $website_hash = hash("sha256", $finalString); $website_hash .= $salt; $validFlag = "FALSE"; if ($website_hash == $paytm_hash) { $validFlag = "TRUE"; } else { $validFlag = "FALSE"; } return $validFlag; } function verifychecksum_eFromStr($str, $key, $checksumvalue) { $paytm_hash = decrypt_e($checksumvalue, $key); $salt = substr($paytm_hash, -4); $finalString = $str . "|" . $salt; $website_hash = hash("sha256", $finalString); $website_hash .= $salt; $validFlag = "FALSE"; if ($website_hash == $paytm_hash) { $validFlag = "TRUE"; } else { $validFlag = "FALSE"; } return $validFlag; } function getArray2Str($arrayList) { $findme = 'REFUND'; $findmepipe = '|'; $paramStr = ""; $flag = 1; foreach ($arrayList as $key => $value) { $pos = strpos($value, $findme); $pospipe = strpos($value, $findmepipe); if ($pos !== false || $pospipe !== false) { continue; } if ($flag) { $paramStr .= checkString_e($value); $flag = 0; } else { $paramStr .= "|" . checkString_e($value); } } return $paramStr; } function getArray2StrForVerify($arrayList) { $paramStr = ""; $flag = 1; foreach ($arrayList as $key => $value) { if ($flag) { $paramStr .= checkString_e($value); $flag = 0; } else { $paramStr .= "|" . checkString_e($value); } } return $paramStr; } function redirect2PG($paramList, $key) { $hashString = getchecksumFromArray($paramList, $key); $checksum = encrypt_e($hashString, $key); } function removeCheckSumParam($arrayList) { if (isset($arrayList["CHECKSUMHASH"])) { unset($arrayList["CHECKSUMHASH"]); } return $arrayList; } function getTxnStatus($requestParamList) { return callAPI(PAYTM_STATUS_QUERY_URL, $requestParamList); } function getTxnStatusNew($requestParamList) { return callNewAPI(PAYTM_STATUS_QUERY_NEW_URL, $requestParamList); } function initiateTxnRefund($requestParamList) { $CHECKSUM = getRefundChecksumFromArray($requestParamList,PAYTM_MERCHANT_KEY,0); $requestParamList["CHECKSUM"] = $CHECKSUM; return callAPI(PAYTM_REFUND_URL, $requestParamList); } function callAPI($apiURL, $requestParamList) { $jsonResponse = ""; $responseParamList = array(); $JsonData =json_encode($requestParamList); $postData = 'JsonData='.urlencode($JsonData); $ch = curl_init($apiURL); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($postData)) ); $jsonResponse = curl_exec($ch); $responseParamList = json_decode($jsonResponse,true); return $responseParamList; } function callNewAPI($apiURL, $requestParamList) { $jsonResponse = ""; $responseParamList = array(); $JsonData =json_encode($requestParamList); $postData = 'JsonData='.urlencode($JsonData); $ch = curl_init($apiURL); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($postData)) ); $jsonResponse = curl_exec($ch); $responseParamList = json_decode($jsonResponse,true); return $responseParamList; } function getRefundChecksumFromArray($arrayList, $key, $sort=1) { if ($sort != 0) { ksort($arrayList); } $str = getRefundArray2Str($arrayList); $salt = generateSalt_e(4); $finalString = $str . "|" . $salt; $hash = hash("sha256", $finalString); $hashString = $hash . $salt; $checksum = encrypt_e($hashString, $key); return $checksum; } function getRefundArray2Str($arrayList) { $findmepipe = '|'; $paramStr = ""; $flag = 1; foreach ($arrayList as $key => $value) { $pospipe = strpos($value, $findmepipe); if ($pospipe !== false) { continue; } if ($flag) { $paramStr .= checkString_e($value); $flag = 0; } else { $paramStr .= "|" . checkString_e($value); } } return $paramStr; } function callRefundAPI($refundApiURL, $requestParamList) { $jsonResponse = ""; $responseParamList = array(); $JsonData =json_encode($requestParamList); $postData = 'JsonData='.urlencode($JsonData); $ch = curl_init($apiURL); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_URL, $refundApiURL); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $headers = array(); $headers[] = 'Content-Type: application/json'; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $jsonResponse = curl_exec($ch); $responseParamList = json_decode($jsonResponse,true); return $responseParamList; } } function getConfigPaytmSettings() { $gs = Generalsetting::first(); if ($gs->paytm_mode == 'sandbox') { define('PAYTM_ENVIRONMENT', 'TEST'); // PROD } elseif ($gs->paytm_mode == 'live') { define('PAYTM_ENVIRONMENT', 'PROD'); // PROD } define('PAYTM_MERCHANT_KEY', $gs->paytm_secret); define('PAYTM_MERCHANT_MID', $gs->paytm_merchant); define('PAYTM_MERCHANT_WEBSITE', $gs->paytm_website); $PAYTM_STATUS_QUERY_NEW_URL='https://securegw-stage.paytm.in/merchant-status/getTxnStatus'; $PAYTM_TXN_URL='https://securegw-stage.paytm.in/theia/processTransaction'; if (PAYTM_ENVIRONMENT == 'PROD') { $PAYTM_STATUS_QUERY_NEW_URL='https://securegw.paytm.in/merchant-status/getTxnStatus'; $PAYTM_TXN_URL='https://securegw.paytm.in/theia/processTransaction'; } define('PAYTM_REFUND_URL', ''); define('PAYTM_STATUS_QUERY_URL', $PAYTM_STATUS_QUERY_NEW_URL); define('PAYTM_STATUS_QUERY_NEW_URL', $PAYTM_STATUS_QUERY_NEW_URL); define('PAYTM_TXN_URL', $PAYTM_TXN_URL); } public function paytmCallback( Request $request ) { $method = Session::get('method'); $invest_id = Session::get('invest_id'); $transaction_id = $request['ORDERID']; if ( 'TXN_SUCCESS' === $request['STATUS'] ) { $invest = Invest::findOrFail($invest_id); $addionalData = ['txnid' => $request['TXNID'], 'status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); Session::forget('method'); Session::forget('invest_id'); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } else if( 'TXN_FAILURE' === $request['STATUS'] ){ return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Payment Cancelled!'); } } } FlutterwaveController.php 0000644 00000011143 15111300251 0011616 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Illuminate\Support\Str; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Models\User; use App\Repositories\OrderRepository; use Illuminate\Support\Facades\Session; class FlutterwaveController extends Controller { public $public_key; private $secret_key; public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $data = PaymentGateway::whereKeyword('flutterwave')->first(); $paydata = $data->convertAutoData(); $this->public_key = $paydata['public_key']; $this->secret_key = $paydata['secret_key']; $this->orderRepositorty = $orderRepositorty; } public function store(Request $request) { $invest = Invest::findOrFail($request->invest_id); $user = User::findOrFail($invest->user_id); $item_amount = $request->amount; $curl = curl_init(); $customer_email = $user->email; $amount = $item_amount; $currency = $request->currency_code; $txref = $invest->transaction_no; $PBFPubKey = $this->public_key; $redirect_url = route('api.checkout.flutter.notify'); $payment_plan = ""; Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/hosted/pay", CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'amount' => $amount, 'customer_email' => $customer_email, 'currency' => $currency, 'txref' => $txref, 'PBFPubKey' => $PBFPubKey, 'redirect_url' => $redirect_url, 'payment_plan' => $payment_plan ]), CURLOPT_HTTPHEADER => [ "content-type: application/json", "cache-control: no-cache" ], )); $response = curl_exec($curl); $err = curl_error($curl); if($err){ die('Curl returned error: ' . $err); } $transaction = json_decode($response); if(!$transaction->data && !$transaction->data->link){ print_r('API returned error: ' . $transaction->message); } return redirect($transaction->data->link); } public function notify(Request $request) { $input = $request->all(); $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); if($request->cancelled == "true"){ return redirect()->route('api.user.invest.checkout',$invest->id)->with('success',__('Payment Cancelled!')); } if (isset($input['txref'])) { $ref = $input['txref']; $query = array( "SECKEY" => $this->secret_key, "txref" => $ref ); $data_string = json_encode($query); $ch = curl_init('https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/verify'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); $response = curl_exec($ch); curl_close($ch); $resp = json_decode($response, true); if ($resp['status'] == "success") { $paymentStatus = $resp['data']['status']; $chargeResponsecode = $resp['data']['chargecode']; if (($chargeResponsecode == "00" || $chargeResponsecode == "0") && ($paymentStatus == "successful")) { $addionalData = ['status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Something went wrong!'); } } } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Something went wrong!'); } } } PerfectMoneyController.php 0000644 00000007510 15111300251 0011711 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Models\User; use App\Repositories\OrderRepository; use Illuminate\Http\Request; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class PerfectMoneyController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; $this->payment = PaymentGateway::whereKeyword('perfectmoney')->first(); $this->paydata = $this->payment->convertAutoData(); } public function store(Request $request){ $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); $user = User::findOrFail($invest->user_id); $gs = Generalsetting::findOrFail(1); $invest_name = $gs->title." Invest"; Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); $info['PAYEE_ACCOUNT'] = trim($this->paydata['wallet_code']); $info['PAYEE_NAME'] = $invest_name; $info['PAYMENT_ID'] = $invest->transaction_no; $info['PAYMENT_AMOUNT'] = round($request->amount,2); $info['PAYMENT_UNITS'] = $request->currency_code; $info['STATUS_URL'] = route('api.checkout.perfectmoney.notify'); $info['PAYMENT_URL'] = route('api.user.invest.checkout',$invest->id); $info['PAYMENT_URL_METHOD'] = 'POST'; $info['NOPAYMENT_URL'] = route('api.user.invest.checkout',$invest->id); $info['NOPAYMENT_URL_METHOD'] = 'POST'; $info['SUGGESTED_MEMO'] = $user->name; $info['BAGGAGE_FIELDS'] = 'IDENT'; $data['info'] = $info; $data['method'] = 'post'; $data['url'] = 'https://perfectmoney.is/api/step1.asp'; return view('payment.redirect',compact('data')); } public function notify(Request $request){ $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); $alt_passphrase = strtoupper(md5($this->paydata['alternative_passphrase'])); define('ALTERNATE_PHRASE_HASH', $alt_passphrase); define('PATH_TO_LOG', '/somewhere/out/of/document_root/'); $string = $_POST['PAYMENT_ID'] . ':' . $_POST['PAYEE_ACCOUNT'] . ':' . $_POST['PAYMENT_AMOUNT'] . ':' . $_POST['PAYMENT_UNITS'] . ':' . $_POST['PAYMENT_BATCH_NUM'] . ':' . $_POST['PAYER_ACCOUNT'] . ':' . ALTERNATE_PHRASE_HASH . ':' . $_POST['TIMESTAMPGMT']; $hash = strtoupper(md5($string)); $hash2 = $_POST['V2_HASH']; if ($hash == $hash2) { foreach ($_POST as $key => $value) { $details[$key] = $value; } $pay_amount = $_POST['PAYMENT_AMOUNT']; $track = $_POST['PAYMENT_ID']; if ($_POST['PAYEE_ACCOUNT'] == $this->paydata['wallet_code'] && $pay_amount == round($invest->amount,2) && $invest->status == 0) { $addionalData = ['txnid'=>$details, 'status'=>'running', 'method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); }else{ return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','Something went wrong!'); } }else{ return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','Something went wrong!'); } } } MercadopagoController.php 0000644 00000003541 15111300251 0011532 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Models\Plan; use App\Models\User; use App\Repositories\OrderRepository; use Illuminate\Http\Request; use Illuminate\Support\Carbon; use Illuminate\Support\Str; use MercadoPago; use Auth; class MercadopagoController extends Controller { public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; } public function store(Request $request){ $gs = Generalsetting::findOrFail(1); $invest = Invest::findOrFail($request->invest_id); $user = User::findOrFail($invest->user_id); $payment_amount = $invest->amount; $data = PaymentGateway::whereKeyword('mercadopago')->first(); $paydata = $data->convertAutoData(); MercadoPago\SDK::setAccessToken($paydata['token']); $payment = new MercadoPago\Payment(); $payment->transaction_amount = $payment_amount; $payment->token = $request->token; $payment->description = 'Checkout '.$gs->title; $payment->installments = 1; $payment->payer = array( "email" => $user ? $user->email : 'example@gmail.com' ); $payment->save(); if ($payment->status == 'approved') { $addionalData = ['status'=>'running', 'method'=>$request->method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); }else{ return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','Something went wrong!'); } } } PayeerController.php 0000644 00000007311 15111300251 0010535 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use App\Http\Controllers\Controller; use App\Models\Currency; use App\Models\Generalsetting; use App\Models\Invest; use App\Models\PaymentGateway; use App\Repositories\OrderRepository; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class PayeerController extends Controller { public $orderRepositorty; public $allusers = []; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; $this->payment = PaymentGateway::whereKeyword('payeer')->first(); $this->paydata = $this->payment->convertAutoData(); } public function store(Request $request){ $gs = Generalsetting::findOrFail(1); $invest_name = $gs->title." Invest"; $invest_number = Str::random(4).time(); $invest = Invest::findOrFail($request->invest_id); Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); $arHash = [ trim($this->paydata['merchant_id']), $invest->transaction_no, $request->amount, $request->currency_code, base64_encode("Pay To $gs->title"), trim($this->paydata['secret_key']) ]; $info['m_shop'] = trim($this->paydata['merchant_id']); $info['m_orderid'] = $invest->transaction_no; $info['m_amount'] = $request->amount; $info['m_curr'] = $request->currency_code; $info['m_desc'] = base64_encode("Pay To $gs->title"); $info['m_sign'] = strtoupper(hash('sha256', implode(":", $arHash))); $info['lang'] = 'en'; $data['info'] = $info; $data['method'] = "GET"; $data['url'] = "https://payeer.com/merchant"; return view('payment.redirect',compact('data')); } public function notify(Request $request) { $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); if (isset($request->m_operation_id) && isset($request->m_sign)) { $sign_hash = strtoupper(hash('sha256', implode(":", array( $request->m_operation_id, $request->m_operation_ps, $request->m_operation_date, $request->m_operation_pay_date, $request->m_shop, $request->m_orderid, $request->m_amount, $request->m_curr, $request->m_desc, $request->m_status, $this->paydata['secret_key'] )))); if ($request->m_sign != $sign_hash) { return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','digital signature not matched!'); } else { $invest = Invest::where('transaction_no', $request->m_orderid)->first(); if ($request->m_amount == round($invest->amount,2) && $request->m_status == 'success' && $invest->status == 0) { $addionalData = ['status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','transaction was unsuccessful!'); } } } else { return redirect()->route('api.user.invest.checkout',$invest->id)->with('unsuccess','transaction was unsuccessful!'); } } } InstamojoController.php 0000644 00000006726 15111300251 0011264 0 ustar 00 <?php namespace App\Http\Controllers\Api\Checkout; use Illuminate\Support\Facades\Session; use App\Repositories\OrderRepository; use App\Http\Controllers\Controller; use App\Models\Generalsetting; use App\Models\PaymentGateway; use Illuminate\Http\Request; use Illuminate\Support\Str; use App\Classes\Instamojo; use App\Models\Currency; use App\Models\Invest; use App\Models\User; class InstamojoController extends Controller { public $orderRepositorty; public function __construct(OrderRepository $orderRepositorty) { $this->orderRepositorty = $orderRepositorty; } public function store(Request $request) { $data = PaymentGateway::whereKeyword('instamojo')->first(); $invest = Invest::findOrFail($request->invest_id); $user = User::findOrFail($invest->user_id); $gs = Generalsetting::first(); $total = $request->amount; $paydata = $data->convertAutoData(); if($request->currency_code != "INR") { return redirect()->back()->with('unsuccess',__('Please Select INR Currency For This Payment.')); } $order['item_name'] = $gs->title." Order"; $order['item_number'] = $invest->transaction_no; $order['item_amount'] = $total; $cancel_url = route('api.checkout.instamojo.cancel'); $notify_url = route('api.checkout.instamojo.notify'); if($paydata['sandbox_check'] == 1){ $api = new Instamojo($paydata['key'], $paydata['token'], 'https://test.instamojo.com/api/1.1/'); } else { $api = new Instamojo($paydata['key'], $paydata['token']); } try { $response = $api->paymentRequestCreate(array( "purpose" => $order['item_name'], "amount" => $order['item_amount'], "send_email" => true, "email" => $user->email, "redirect_url" => $notify_url )); $redirect_url = $response['longurl']; Session::put('method',$request->method); Session::put('invest_id',$request->invest_id); Session::put('order_data',$order); Session::put('order_payment_id', $response['id']); return redirect($redirect_url); } catch (Exception $e) { return redirect($cancel_url)->with('unsuccess','Error: ' . $e->getMessage()); } } public function notify(Request $request) { $input_data = $request->all(); $payment_id = Session::get('order_payment_id'); $method = Session::get('method'); $invest_id = Session::get('invest_id'); $invest = Invest::findOrFail($invest_id); if($input_data['payment_status'] == 'Failed'){ return redirect()->route('api.user.invest.checkout',$invest->id)->with('error','Something went wrong!'); } if ($input_data['payment_request_id'] == $payment_id) { $addionalData = ['txnid' => $payment_id, 'status'=>'running','method'=>$method]; $this->orderRepositorty->apiOrder($request,$invest,$addionalData); return redirect()->route('api.user.invest.checkout',$invest->id)->with('message','Invest successfully complete.'); } return redirect()->route('api.user.invest.checkout',$invest->id)->with('warning','Something went wrong!'); } public function cancel(){ return redirect()->route('user.invest.checkout')->with('warning','Something went wrong!'); } }
Simpan