We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
Hi, Christopher
Maybe package install not properly
Can you uninstall and try again pls
i did it anyway... just i made manually the file and it work perfectly. THX for this post :D
I have more then 1 item in database. I use following Code :
$order_discount = $order->invoice->discount;
$order_subtotal = $order->invoice->sub_total;
$order_grandtotal = $order->invoice->grand_total;
$i = 1;
$order_items = array();
foreach ($order->invoice->products as $product) {
$order_items[$i] = new Item();
$order_items[$i]->setName($product->name)
->setCurrency('USD')
->setQuantity($product->qty)
->setPrice($product->price);
$i++;
}
if ($order->order_discount > 0) {
$order_items[$i] = new Item();
$order_items[$i]->setName('Discount')
->setCurrency('USD')
->setQuantity(1)
->setPrice('-' . $order_discount);
}
$item_list = new ItemList();
$item_list->setItems($order_items);
$amount_details = new Details();
$amount_details->setSubtotal($order_subtotal);
$amount = new Amount();
$amount->setCurrency('USD')
->setDetails($amount_details)
->setTotal($order_grandtotal);
$transaction = new Transaction();
$transaction->setAmount($amount)
->setItemList($item_list)
->setDescription('Your transaction description')
But it return
PayPalConnectionException in PayPalHttpConnection.php line 154:
Got Http response code 400 when accessing https://api.sandbox.paypal.....
setPrice() and setTotal() must be equal
I did not find any solution yet. here my controller code : https://pastebin.com/yR5L5i3G can you check please? https://uploads.disquscdn.c...
According to what I read, that problem is caused because the sum of the items must be equal to the total, sum all your items and verify if it is equal to what you put in total. (setPrice() and setTotal())
Try a simple test.
Put only one item, price 10 USD and total put 10 USD.
With that, you should open paypal and should not appear error 400.
Good day, could you tell me how you solved this problem?
https://uploads.disquscdn.c...
After entering paypal account details, getting below error. Please help
someone please help me to work this tutorial on laravel 5.4
i am new to laravel but i have followed the steps but vendor publish doesn't create the config file, i had to create it manually but in the end am having an error,FatalThrowableError in AddMoneyController.php line 33:
Cannot call constructor https://uploads.disquscdn.c...
ojijo did you get help?
No i haven't maybe it's am using laravel 5.4 but it keeps on bringing that error in the line in the AddMoneyController line 33 where there is parent::__construct();
FatalErrorException in AddMoneyController.php line 119: Class 'Input' not found
nice.. tanks
Hi, thanks for the tutorial, it is very great. I cant get the value I paid from the paypal response. How can I do this so I can save the value in database and give value to user. Please help.
You set this way on return url : $redirectUrls->setReturnUrl(route('getDone',['id'=>12]));
why "php artisan vendor:publish doesn't make the file "paypal.php" on my "Config" folder? please help me