I found link for making buy now payments using PayPal. For example, the following link is used for payment for Buy Now buttons:
https://www.paypal.com/cgi-bin/webscr?business=example#yourwebsite.com&cmd=_xclick¤cy_code=USD&amount=99&item_name=productname
where it uses some variables like business(for receiver's email), amount, item_name,etc..,
I am looking for a link just like the above for subscriptions with start date, i.e, a valid variable for specifying the subscription to start. I Googled it and I found the variable subscr_date can be used for specifying the start date. but I don't know how to make a proper working link for subscription with start date.
I think you're confusing the two. PayPal does provide a query string button for Buy Now but I don't recall ever seeing one for subscriptions. Instead, those buttons typically contain a form with all of your options.
PayPal does have a simpler solution now. Their Javascript Buttons library appears to greatly simplify this process. I think this might do what you want it to.
<script src="paypal-button.min.js?merchant=YOUR_MERCHANT_ID"
data-button="subscribe"
data-name="My product"
data-amount="1.00"
data-recurrence="1"
data-period="M"
async
></script>
If that still won't work, you will need to use the Payments Standard HTML, which also supports recurring payments
Related
I'm creating a progress bar for my product pages that show how much you have to spent until you get free shipping. Everything works great, except that I can't get the shipping rates with the rate for which the client will get free shipping. Currently my request looks like this:
if (cart.items.some(i => i.requires_shipping === true)) {
const url = '/cart/shipping_rates.json?' + encodeURI('shipping_address[zip]={$zip}&shipping_address[country]={$country}');
jQuery.getJSON(url, function(shipping_rates) {
console.log(shipping_rates);
});
}
The If statement checks if a Product is in the Cart that requires shipping. With this setup I'm getting the shipping method based on the current cart value. Expl: If the cart value is below the 25€ free shipping threshold the shipping method shows that shipping costs 3.5€ and once the cart value is above the threshold, it show that the shipping is free.
I want to get the threshold based on the country the client lives in. Is there a way to get the Threshold with a request without making complicated logic based around the shipping_rates?
The problem with this approach is that your request is retrieving currently available shipping rates for the given order but they are not showing the next level.
There are a few problems with this approach:
You won't get next-tier details (e.g. how much $ away you are from the next shipping). It would be best if you stored that info somewhere and JS is not a good place for that.
I am not sure if Script Editor / Shopify Functions shipping discount will be calculated at this point. It will be in the checkout step, but I have never heard of that happening on the cart request level. If my concerns are true then this endpoint is not the best choice for being the source of truth.
You are making a javascript request which takes time and assuming you are showing that info somewhere, you are experiencing reflow and CLS issue
3.1 Such a request could fail.
Since you need to define business logic somewhere and you can't get rid of that requirement, I would highly recommend keeping that logic in meta fields/theme customizer (tiers, discount values) and calculating everything using liquid code. On refresh, you can use Section Rendering API to reload a given part of the page. This is how it solves the above problems:
Your tiers setup is stored in fields/theme customizer which can be accessed using liquid.
You don't need to worry about falsy result from API (shipping rate set up in admin panel vs possible discount) because this is defined by you. The downside is you need to keep discount logic in two places - backend and frontend (liquid) and keep it in sync.
Because you calculate everything using liquid you don't get reflows, issues with loading fetch data and content layout shift.
According to the documentation for setting error (and warning) messages you can specify a number of parameters (file, line, col, etc). What is the intended purpose of this? I've spent a fair amount of hours attempting to make use of them but I can't see GitHub actually using them.
I can confirm that title and message does work. It would be very nice if this could link directly to the code into the pull requests or action results.
with fullcalendar v3.0.1 I try to set initial date range with this setting:
startParam: '2017-01-01 00:00:00',
but, if I go back into the past with arrows button, I can back to 2016 and previous years...
What makes you think that startParam restricts when the calendar can go back to? It's a parameter passed to the server when new events are fetched which tells the server the start date from which events should be returned in the current request - generally it will correspond to the start date of the current view in the calendar. And if you look at the docs for this property: https://fullcalendar.io/docs/event_data/startParam/, it mentions nothing about what you describe. I don't understand why you thought this would work.
If, for some reason, you want to stop users going back in time before a certain date, there is no currently official supported way to do this. This issue log: https://github.com/fullcalendar/fullcalendar/issues/429 suggests that support may arrive in a future version, but at present you will need to work around it.
To be honest though I'm not sure why you really would need to do this. If you want to prevent users seeing any events before a particular date, the simplest way would be not to provide any event data to the calendar which is before that date - then if the user moves to those earlier dates, the calendar would simply be blank.
If you really feel you need to do this though, the only way I can think of would be to handle the viewRender event, and if the first day displayed in the view is on or before your minimum date, disable the "previous" button, or something.
Seems like a simple/obvious question but I can't find the answer in the docs or anywhere else. If I use this:
https://msdn.microsoft.com/en-us/library/windows/apps/windows.system.userprofile.userinformation.aspx
Mostly GetDisplayNameAsync, what happens if the user isn't logged in? Do I need to use some other classes to handle login and add a some login/change account options to my UI?
All I need is the display name, for a leaderboard/high scores list. I thought about using the Xbox Live API for leaderboards, but I guess that isn't open to the general public, so making my own.
Based on comments: It always returns something, unless blocked by privacy settings.
It's not very useful for my intended usage, since I was looking for more of a "screen name" or "gaming name" or "profile name". Currently you would need to be a MS partner and use the XBox/Live SDK for that type of thing.
I am trying the post an invoice to SAP using the F-47 transaction and using SHDB to record the transaction and learn how it works. I see there that sometimes BU and ZK BDC OK codes are used. I would like to understand the difference between them, but could not find any official documentation. Please, explain the difference between the two?
I found the meaning of some of the status codes. I post it here, so I can remember:
/00. Enter
/AB Go to overview
=ZK Go to additional information
=ENTE Enter (don't know exactly what is difference between /00)
=PI select cursor location
=STER Go to taxes
=DELZ delete cursor
=GO continue
=BU post (save)
/EEND end processing
=Yes select "yes" from message box
=BP park (save)
=ENTR Enter (don't know exactly what is difference between =ENTE or /00)
=AE save when changing document
=BK change document header (parking or posting parked document)
=P+ next page
=BL delete parked document
A BDC_OKCODE indicates which action is (will) be executed on a screen (things like save, back, exit etc). The BU code is used for a SAVE function (like in MM01 transaction). Sorry but I cannot recall to which function ZK maps to. Obviously their difference lies in the fact that they map to different functions. You can still find out which function each button utilizes by using System->Status->GUI status.
By the way, BTCI transactions are not fully robust- minor changes in GUI flow let your program break. Error handling / analysis is tedious.... DId you have a look to posting methods more preferably? E.g. like BAPI_* function modules? With the help of LSMW you can browse for different input methods and use them later standalone. Or you can use transaction BAPI directly.