avored / laravel-ecommerce

AvoRed an Open Source Laravel Shopping Cart
https://avored.com
1.5k stars 549 forks source link

stripe error avored E commerce #175

Closed crijoemoi closed 6 years ago

crijoemoi commented 6 years ago

Bonjour, je teste avored ecommerce et j'ai l'erreur suivante lors du paiement avec stripe Cannot use object of type AvoRed\Framework\Cart\Product as array sur la ligne 83 du fichier laravel-ecommerce/modules/avored/ecommerce/src/Payment/Stripe/Payment.php 83 $subTotal += $product['price'] * $product['qty'];

boucle
foreach ($cartProducts as $product) { $subTotal += $product['price'] $product['qty']; $taxTotal += $product['tax_amount'] $product['qty']; }

Si quelqu'un pourrait m'éclairer merci

indpurvesh commented 6 years ago

A bug has been fixed to check. You have to reinstall it again to get the latest release with updated code.

If you don't want to reinstall it again in that event try below download below file and replay it with the code: https://github.com/avored/laravel-ecommerce/blob/master/themes/avored/default/views/checkout/index.blade.php https://github.com/avored/laravel-ecommerce/blob/master/themes/avored/default/views/checkout/cards/payment-options.blade.php

Step 2: do composer update

composer update

I hope these above technique works for you.

crijoemoi commented 6 years ago

Merci pour votre reponse, j'ai bien mis à jour les 2 fichiers que vous m'avez mis en liens mais quand je fais un composer update il me sort l'erreur suivante :+1: Exception trace:

1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Undefined index: name", "/var/www/laravel-ecommerce/vendor/avored/framework/src/Modules/Manager.php") /var/www/laravel-ecommerce/vendor/avored/framework/src/Modules/Manager.php : 63

2 AvoRed\Framework\Modules\Manager::loadModules() /var/www/laravel-ecommerce/vendor/avored/framework/src/Modules/Manager.php : 33

j'ai bien fait un php artisan cache:clear aprés mais toujours la même erreur.

indpurvesh commented 6 years ago

@crijoemoi Sorry actually I was not yours but it was my mistake of committing the file that i was working on. (it was custom (developer) modules creation feature for avored )

I have put the solution on avored.com discussion website.

http://www.avored.com/discussion/strip-pament-error

crijoemoi commented 6 years ago

Bonjour et un grand merci pour votre réponse . J'ai une nouvelle erreur au niveau de la table car aprés avoir soumis le formulaire de commande avec stripe, il m'affiche l'errreur suivante
"SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (laravelecommerce.avored_addresses, CONSTRAINT addresses_country_id_foreign FOREIGN KEY (country_id) REFERENCES avored_countries (id) ON DELETE CASCADE) (SQL: insert into avored_addresses (first_name, last_name, phone, address1, address2, country_id, state, city, postcode, type, user_id, updated_at, created_at) values (moijb, chr, 0102030405, 2 rue de chicago, , 0, grand est, charleville-mézières, 08000, BILLING, 2, 2018-07-09 15:27:27, 2018-07-09 15:27:27)). Comme je débute en laravel, je n'arrive pas à trouver la solution pour cette erreur .Ce serait sympa de votre part si vous pouvez me dire comment faire ? bonne journée

crijoemoi commented 6 years ago

Désolé de vous avoir soumis le commentaire 15 minutes plutôt car l'erreur venait je crois du validate car le formulaire est partie sans avoir été renseigné au niveau du pays ( liste déroulante), je suis bien arrivé à passer une commande avec stripe avec le bon retour. Encore merci. Je vais essayer d'ajouter paypal, mais je crois que çà ne va pas être du gâteau. Merci et bonne journée

indpurvesh commented 6 years ago

@crijoemoi take a look at this discussion forum. If you follow this steps it helps you to add paypal payment gateway. Let me know if you get stuck at some place. I will double check the validation error and fixed it too. thanks again.

http://www.avored.com/discussion/trying-to-create-razorpay-pament-gatway