coding first php cart - advice needed - php

I'm a php noob attempting my first shopping cart. I intend to use paypal checkout when the cart is ready. I'm having fun playing with this but need assistance.
Here is what I got so far: futurekode.com/uikits/store.php
I'm using form post to send the quantities to the cart.php page.
My question is how do I populate the table on the cart.php page with all the info like product name and price? Do I need to setup a database or could I use hidden inputs?
Any advice and sample code is appreciated
Thanks in advance

Database will be the preference, for persistence, but you can use a session which will be much better than hidden inputs.

As a self-admitted PHP 'noob', would it not be better for you to use a free shopping cart system such as Zen Cart or Cube Cart?
These pre-existing shopping carts will be able to offer you a much quicker solution as you won't need to code them, will likely have better security in place, and even integration with PayPal.

As you said you will be appreciating some code let me first give you the link for PHP Paypal SDK with which you can use following options for your checkout PAYPAL PHP SDK
DoDirectPayment - Sale
DoDirectPayment - Authorization
ExpressCheckout - Sale
ExpressCheckout - Authorization
ExpressCheckout - Order
DoDirectPayment - 3DSecure - Sale
Just download sdk for php from here reflect your paypal test account changes and enjoy the code

Related

Using Typeform for making product orders and paying with PapPal

I am making a Typeform as an order form for my product that has a lot of customization so Typeform is perfect for it, however Stripe payments are not available in my country. Does anyone have experience with integrating Paypal into Typeform order form? Possibly by using page redirect and then passing the price to the paypal payment button and somehow linking the form submission ID with the payment ID?
Or are there any other services like Typeform that are so easy to use and look great?
Thank you for any help / suggestions
I think the best option in your case would be using the redirect after submit feature.
If you're using Typeform as an order form then probably you're using the calculator feature to get the final price, so you have some kind of PRO account. I'm not sure how the PayPal API works, but if you use redirect after submit (in the form settings) then you can add the calculated "score" (price) as a querystring there.
For details on how to set it up, checkout Typeform's help center
Quill Forms has a native integration with Paypal and supports subscriptions as well.

Can I create PayPal shopping cart for different vendor

I have items and vendors table each vendors have different items to sell and all the vendors have their own email and password for login. I want to create shopping cart with PayPal when the user want to buy something they will click buy and it will add it to paypal shopping cart and then when they process to payment the money will go to the vendor. I'm not really sure how to start or is this good idea or not any suggestion?
Based on the info provided I would recommend using the Express Checkout API. Specifically, you'll be using:
SetExpressCheckout
GetExpressCheckoutDetails
DoExpressCheckoutPayment
In the SEC and DECP request you'll use the PAYMENTINFO_n_SELLERPAYPALACCOUNTID parameter to specify the account the money should go to.
Using this method you will use your own API credentials in the API calls, and you will not need to worry about setting up permissions or anything for the vendors.
Since you're working with PHP I'd recommend using this PayPal PHP SDK. It will make the API calls very quick and easy for you.

Paypal Pro not showing shipping methods in magento

I am using paypal pro express checkout in magento 1.6 when I try to paypal pro express checkout from cart or product page its redirect to paypal page but there is no shipping option showing in paypal page for select shipping method.
Here is image from product page
Here is paypal page image
From image you can also get more idea
Any one know how to do it ?.
Yes it is correct. Paypal pro express checkout work similar. When User Click on Pay now Button. User will again redirect on Site, On Paypal Express Order Review Page.
Where user will have the option to sleecte applicable shipping method and click on Place Order button to place order finally.
The answer from Pankaj Pareek is absolutely correct. This is the checkout flow on Magento for Paypal Express. Note that your question title is misleading, whether you are using Paypal Payments Pro or Paypal Standard is irrelevant - when the user clicks the button from the cart or product page they are using Paypal Express to check out.
Magento's default Paypal Express checkout flow is dire - it actually takes longer to check out this way than a normal checkout as there's a ludicrous review step. You should note that even though you are using 1.6 it has not improved in the intervening 4.5 years despite them being bought by ebay.
Basically it's a backend config option to pass the shipping methods across.
However there is a bug which means its the id that gets shown in Paypal, not the label. It looks awful in Paypal. I stuck a module to fix it up in this answer;
https://magento.stackexchange.com/questions/6945/paypal-express-shipping-methods/#answer-50290
And other than this small problem the communication on shipping between Paypal and Magento works really well. User updates the address and the shipping options update etc.
You can further improve this flow by removing the review stage altogether in Magento. That is a bit harder, there are modules you can buy that help. It all massively improves conversion rates, it is well worth doing.

Magento - PayPal not redirecting to mobile site

On my Magento store I have a problem with PayPal. Magento is not redirecting PayPal payments to the mobile PayPal template if the customer is using a mobile phone or tablet. I contacted PayPal and they let me know that the variable "discount_amount_cart" should be removed in order to redirect customers to the mobile PayPal site.
I'm using the standard, built-in PayPal Website Payments Standard payment method. I searched the internet, but I can't find out what the consequences are when I remove that variable, and how I can do that.
Do you have any idea?
Thank you.
The only place this variable seems to be set is in this method: Mage_Paypal_Model_Api_Standard::getStandardCheckoutRequest(). In my opinion the discount should not be related to the mobile page, but you can try to remove it anyway.
discount_amount_cart is a optional field:
Single discount amount charged cart-wide.
It must be less than the selling price of all items combined in the cart. This variable >overrides any individual item discount_amount_x values, if present.
Applies only to the Cart Upload command.
-- PayPal - HTML Variables for Shopping Carts
I've got an answer back from PayPal: Unfortunately, there is no workaround for this currently. You cannot use the discount parameter and still use the mobile optimized checkout.
Bummer! We have to use the default website. Thank you, Simon H, for your help!

paypal integration according to dynamic choices

I want to integrate paypal with my website.
I have studied the documentation available on paypal website.
My requirement is
A user selects a category, based on category course is populated,user selects course and discount. I want the user to pay through paypal according to the course selected. Also the data should be inserted into a table after successfull payment.
I have checked sample code also but i am unable to figure out how to accomplish this task ie how to make it dynamic according to the user choice. I think ipn would be used but not sure.
Plese help
Thanks
I don't think there is an option for that. Only configured prices.
The only field that doesn't have an price setup is "Donations"
Also in PayPal you can configure the stock that you have for every products, shipping price and tax.

Categories