Creating paypal checkout button with different prices? - php

I have a website giving services for money, i just want a button goes to a paypal checkout page with a price specified by me. There is no product or service name, just website name and price. But i couldn't find something like that. I have too many different prices, so i can't create buttons for every price. Is it possible to define price as a variable in my webpage, and send paypal this? I use php.

Related

add apply coupon link to woocommerce customer payment page

I have developed a system to create orders programmatically in woocommerce. However when a customer clicks on the link to go to their payment page it does not show the 'Have a Coupon' input box. I haven't adjusted any of the templates.
Any ideas on how I can get the coupon input box to appear on the customer payment page?
Location I am talking about is:
<mywebsite>/checkout/order-pay/<order_id>/?pay_for_order=true&key=<order_key>
Thank you for any help with this, I am struggling with it
Payment page is an endpoint, so must apply coupon before it reaches this point

Silverstripe Handler

I am trying to find ways to do a piece of functionality which is nice to have. Not sure how to approach. Proper silverstripe way would be good.
I have a website (built in Silverstripe)that has multiple types of products, example
Payment type (Products that needs payment)
Email type (Products that does not need payment but just requires users email)
Just delivery type (Products that does not need payment but need users address)
The idea is, users can add anytype of product to the basket and basket summary shows all the different types of products the user has added to basket. Once the user clicks checkout button , each type of product has its own handler to do the checkout.
How can i achieve this? Ideas please i.e how should I structure/architect it.
Ideally I would like to have this URL structure
http://example.com/orders/checkout/Payment
http://example.com/orders/checkout/Email
http://example.com/orders/checkout/Delivery
R
I'd recommend that you start with an existing SilverStripe e-commerce module.
https://github.com/silvershop/silvershop-core
http://www.silvercart.org/
https://github.com/sunnysideup/silverstripe-ecommerce
SilverShop is my personal preference.

Variable 3rd party paypal Shopping cart

Simply put a flexible check out paypal button using your own shopping cart.
one that sends each product plus quantity to the paypal payment page.
I've seen codes for multiple products, but those are not flexible. for example Payment for 2 unique items. but what about if the user buys X amount of different products? when only allows a fixed amount.
Referring to This page
Is this possible to do in PHP? If so I was thinking of something easy like an array listing each product with in the button form.
This would be possible. However, you would want to have some logic on your side that would check to see that amount that they are wanting to order and check it against your database to see the quantity that you have on hand. If they try to order more than you have on hand, you would give them a pop up telling that you only have x number on hand and that they can not order more than x amount. Then you would just populate the details and quantity that they ordered, and pass it over using the cart upload method similar to the example you provided.

How to pass variables of each item through to paypals cart when selecting paypal's 'add to cart' button?

I am developing a website selling gardening products using PHP and SQL. The user searches for a plant, finds the one they want, clicks on it for more details and there they see an option to add to cart. I have signed up to Paypal's business account and used their add to cart button. But currently, when I try it out and click the button, it doesn't do anything. Obviously this is because know variables have been passed about that specific product. What do I need to do in order to get each item into the cart?
#QUESTION:
To impliment a normal POST to pass to standard form, follow this tutorial:
http://www.evoluted.net/thinktank/web-development/paypal-php-integration
#INTEGRATED SOLUTION:
Integrated solutions will allow you to make these transactions without going offsite.
Using this method requires alot more security.

Send users to a pre-filled Amazon cart checkout

I'm working on a site that will create pre-set packages of items. To start, I'm using Amazon to test the idea, pulling some affiliate sales, and then I'll fulfill orders myself if the idea deems successful.
My goal is to have a "buy now" type button, and upon clicking, the user will arrive at an Amazon checkout now page, with a cart pre-filled with items of my choosing, and my affiliate number.
I'm a PHP developer, so if a solution must be language specific, that's the language to go with. If it's more of a conceptual answer, or if there's an API for this, that works too.
You may use link that contains ASINs and their quantity. It doesn't add items to someone's cart but confirms to add to cart.
URL:
http://www.amazon.com/gp/aws/cart/add.html
Parameters:
- AssociateTag
- ASIN.<number> <number> starts at 1
- Quantity.<number> one quantity parameter for each ASIN parameter
Example (parameters separated by line break for visibility):
http://www.amazon.com/gp/aws/cart/add.html
?AssociateTag=your-tag
&ASIN.1=B003IXYJYO
&Quantity.1=2
&ASIN.2=B0002KR8J4
&Quantity.2=1
&ASIN.3=B0002ZP18E
&Quantity.3=1
&ASIN.4=B0002ZP3ZA
&Quantity.4=2
One line example: https://www.amazon.com/gp/aws/cart/add.html?AssociateTag=your-tag&ASIN.1=B003IXYJYO&Quantity.1=2&ASIN.2=B0002KR8J4&Quantity.2=1&ASIN.3=B0002ZP18E&Quantity.3=1&ASIN.4=B0002ZP3ZA&Quantity.4=2&ASIN.5=B004J2JG6O&Quantity.5=1
ASINs are found in the product's page URL or by searching for "ASIN" on the product page. More details here
Amazon does not allow you to add items to someone's cart. They require that the user making the purchase click the add to cart button.
The best you can do for this is to create a Listmania! list with the items. You can see more details about how to do that here.
You then need to make an affiliate link to the list, and instruct the user to click the 'Add all Items to Cart' button at the bottom of the list.
Unfortunately, there is no way to make this take less clicks for the user since Amazon does not want users accidentally purchasing items they did not want.

Categories