paypal subscribe monthly option and buy now full price in one button call - api

I have looked through the docs of paypal's api and cant find and option that will allow me to have a user click on a buy now button on my site and when they land on the paypal payment screen be presented with two ways to pay.
Either a monthly cost of $25. subscription model.
One time yearly payment of $300. non-subscription model.
Has anyone done this or could point me in the right direction. Ideally i want the select options to live on the paypal side not my website's side.
THanks

After looking into this some more here is what i found:
2 options:
- Create two buttons with each values. 1 reoccurring and 1 flat rate.
- Create a button with drop-down code that has two reoccurring payment options. You need to have a drop-down on your site for them to select and pass that option to PayPal. The only downside to this is that they both seem to have to be reoccurring and cant be different types.

Related

Integrating Shopify and third-party gift-card system

Background
I am working with a retailer who has a store on Shopify. The store is not
on Shopify Plus.
The retailer has gift cards from a company other than Shopify. Each gift
card has a number on it that uniquely identifies the card. Associated with
the cards is a HTTP API, available to authenticated users, which can be used
to get or change the balance on a card.
Requirement
The retailer wants to allow customers to use these cards when ordering from
his Shopify store.
Ideal UI
From the user-interface point of view, the ideal would probably be something
like the following. We would add an input field to the Shopify payment
form, near the input field that has the placeholder "Gift card or discount
code". This new input field would be for the third-party gift-card number.
Suppose a customer had a gift card and entered its number into this input
field. Some custom software would check whether the gift-card number was
valid and the gift-card had funds. If either check failed, an error message
would appear in the form.
If both checks succeeded, the form would show success (perhaps by putting a
green check mark) next to the input field. Then it would adjust the balance
to be paid by the customer. For example, if the customer was ordering $300
worth of shoes, and tendered a gift card holding $50, then the $300 would be
adjusted to $250.
When the customer pressed the button to place the order, Shopify would debit
$250 from his credit or debit card, and some custom software would debit $50
from his gift card. It's probably acceptable for this custom software to
run after a delay of 5 seconds or so. (For example, it might be triggered
by a webhook.)
Discussion
I've been looking for a way to do the above. The really hard part is to
adjust $300 to $250 (not just in the form, but when Shopify actually charges
the customer). I have considered the following, singly and in combination:
Changing the Liquid templates.
Putting some custom JavaScript in the Shopify pages.
Writing an app that uses the Shopify Storefront API.
(3) seems the most promising, but it's not easy to see how to do in a "surgical"
way so that I only replace one screen.
I don't want to have to reimplement an entire Shopify store using the Storefront API.
Alternative UI
If you can think of an alternative UI that would achieve the same thing,
please feel free to propose it.
Similar question
This question,
including the questioner's two comments, describes a situation
identical to mine.
However, the only answer (if I understand it correctly) is unacceptable to me.
Ruled-out alternative
I proposed a web service to turn these third-party gift cards into Shopify
discount codes. That idea was rejected by the retailer, because he already
uses Shopify discount codes, and Shopify's form only allows a single
discount code.

Donate button option

We already have a Donate button on our site. Now we want that button to bring up 2 choices of which fund the donation will go to. GENERAL FUND or BUILDING FUND. Is this possible and if so, how? We're not programmers.
Not being programmers makes this a bit trickier. While David's answer is technically correct in that paypal doesn't support this, there might be an easier alternative if you're willing to change your definition of success.
The paypal button maker allows you to choose your own image for the button. Therefore, you can make two buttons, one that says General Fund and another that says Building Fund.
It won't be a single button that brings up two options, but it's close and more importantly, is feasible.
If you have one account for both funds and just want to know in each transaction which fund the money should go to, then you can add a drop down option. You can do this inside your paypal account where you create buttons.
If you have two separate accounts for each fund, you will need two different donation buttons for each fund.

Switch the shipping rate dynamically in Shopify

I'm planning a new Shopify project, and the site requires a different shipping cost depending on the postal area of a postcode (e.g. SE1, N7). The plan was to manually add different shipping options inside of Shopify, then AJAX GET /cart/shipping_rates.json, and manually filter to the correct shipping rate by matching the name to postal area.
But my question is -- is there any way to carry over this shipping method to the Checkout as a selected option, and hide the Shipping Method drop-down from the checkout to prevent them choosing a different the shipping cost?
... Or, ideally, is there a way for me to directly override shipping costs through the API?
I don't know of any onboard functionality, which can facilitate this.
But there is a quite hacky workaround, that I use to filter the shipping rates in the checkout page.
Through the "Additional Google Analytics Javascript" field you can sneak a JS on every page of the shop, including the checkout. Here you can basically manipulate the shipping rates as you like.
In your case, the code must be aware of the shipping_address zip code. You can try to set a cookie on the first checkout page and then read the same cookie on the second.
Unfortunately, this isn’t possible with Shopify’s existing checkout.

When should the Ecommerce tracking take place?

I am implementing Google analytics onto a ecommerce site. We are already tracking events like adding to cart, removing etc using the event tracking. I would like to know what is the ideal time to use the ecommerce tracking apis (addTrans & addItem). Here are my questions:
Should I call these functions for each product being added to cart?
Should I call these functions only when the payment is complete and them while displaying receipt screen?
What is the ideal way of implementation? please provide best practices if possible.
Thanks in advance
I would track few things,
1.How many got into payment form and failed to buy, which can indicate to you that something wrong with payments or page itself. Count number of visitors in checkout - number of orders.
2.How many users got into site and haven't added at least one product, which will indicate that something wrong with advertisement, landing page or website layout in general. Number of unique visitors - those who added at least one item.
Adding statistics for each product added to cart shows you what? If users buy certain product you can get that this product is most wanted but in cart means noting imho. As for your second question, i would implement my solutions written above.
I wonder if your customers should go to an externally hosted page to make a payment. If they do, then GA tracking will not show you the real source of your profitable traffic - it will show you the payment processor page as the source.
It is recommended, or at least suggested, that you place the eCommerce tracking that includes the _trackTrans call on the "Thank You" or "Confirmation" stage of your checkout process.
Also, it's worth noting that if the user refreshes that page that the tracking is on then the code will be fired again and you may see skewed figures in Google Analytics.
I was like you, I also implemented the event tracking first but I wanted to get a chance to implement the ecommerce tracking to get some $ data in there to browse. So, on the developers page. One of the examples is on the reciept page, but on my implementation that wasn't going to work since I am use a payment API. So, On my checkout page I setup the parent transaction. using :
_gaq.push(['_addTrans',
'1234', // transaction ID - required
'Acme Clothing', // affiliation or store name
'11.99', // total - required
'1.29', // tax
'5', // shipping
'San Jose', // city
'California', // state or province
'USA' // country
]);
Then when I am listing my items in the cart, I use PHP and a foreach to dump each item, sku, price per item and quantity into the parent level transaction like this :
_gaq.push(['_addItem',
'1234', // transaction ID - required
'DD44', // SKU/code - required
'T-Shirt', // product name
'Green Medium', // category or variation
'11.99', // unit price - required
'1' // quantity - required
]);
For the last step in the process, I send transaction data to my merchant processing (paypal) via the SOAP api and get numerous responses back. I do different stuff based on the response I get back. If there is no error from the JSON response I get an COMPLETED response, at that point is when I fire the :
_gaq.push(['_trackTrans']);
I'm not really sure if this is the true way to go about it, but it makes sense to me.

Easiest way to sell stuff and track inventory

on my website I sell unique items. I have programmed it so that on the selling page, users can select any amount of these items, and it calculates the cost. The key is that I only have 1 of each of these items. So I need the shopping cart system to not allow the payment to go through unless it is available.
I've been searching for a good quick/easy/cheap solution and can't find one. I don't expect this site to make a lot of money (the transactions are a few bucks), so I didn't want to need a ssl certificate.
The only way I know of not needing an ssl certificate would be to use paypal or google checkout. However, I do not think there is a way of using these services and making paypal's server run a script to check how many are available on the site. Any solution?
Thanks
I was thinking about it more, and I think the problem is that once the user gets to the paypal payment screen, I have no control. I guess I could do something like they click the buy it now link, a php script updates it to sold, then they go to the paypal screen, but then they might not continue the purchase...
If you use PayPal Website Payments Standard (using a cart rather than 'Buy Now' Buttons) then you could use IPN or PDT (see the paypal docs here) to get PayPal to call back to you with the status of the payment.
The work flow would then be to set status to reserved when the item is added to the cart, and then wait for the IPN/PDT call to come back with the payment status, and mark the item as sold.
You would still need to check and reset to available any item that had been reserved for longer than say 2 Hours. (You could do this before serving a page to a user so that they have the latest availability and you don't need a cron job or long running process)
If you could provide a little more information about how you have implemented ur shopping card, it would have been more easier for other to assist! If you are using any ecommerce solution then it should be there already in the track inventory section. But Provided that you have implemented d shopping cart manually, why don't you add little bit of codes that checks the inventory status first before letting your customers check out?