How to remove Ship to label from PayPal payment. I am using Nuget package PayPal using MVC 4 site. The problem is everything works fine but i have to remove Ship To box. Is there any option to remove this.
Are you using Payments Standard or Express Checkout? I'm going to assume it's Express Checkout.
With that assumption being true, you can add NOSHIPPING=1 to your request in order to eliminate the shipping selection during checkout.
This link will solve my issue.
Thank for above suggestions.
paypal api: take immediate payment without a shipping address
When I was using smart payment buttons, the following helped me to hide ship to.
createOrder: function(data, actions) {
var payableAmount = 3;
return actions.order.create({
purchase_units: [{
amount: {
value: payableAmount
}
}],
application_context: {
shipping_preference: 'NO_SHIPPING'
}
})
}
Related
I come from a react web background and I'm familiar with the online payments api. Currently, I am using the react native quick start for the square reader SDK. The SDK uses:
await startCheckoutAsync(checkoutParams)
which is a function that handles payment through the mobile application without connecting to a backend (which is what I'm used to in Web application development). The checkout parameters look like this:
// A checkout parameter is required for this checkout method
const checkoutParams = {
amountMoney: {
amount: 100,
currencyCode: 'USD', // optional, use authorized location's currency code by default
},
// Optional for all following configuration
skipReceipt: false,
collectSignature: true,
allowSplitTender: false,
delayCapture: false,
note: 'Hello 💳 💰 World!',
tipSettings: {
showCustomTipField: true,
showSeparateTipScreen: false,
tipPercentages: [15, 20, 30],
},
additionalPaymentTypes: ['cash', 'manual_card_entry', 'other'],
};
However my issue is that there is no way to associate an order with this checkout flow.
According to the Square Reader documentation:
https://github.com/square/react-native-square-reader-sdk/blob/master/docs/reference.md#checkoutparameter
checkout parameter does not take in an order id, or someway to map what is getting sold, unlike the online create payment api:
https://developer.squareup.com/reference/square/payments-api/create-payment
which specifies an order id in the API call.
How do I properly handle associating an order Id to the react-native card reader sdk checkout flow
At this time, there is no proper way to link an order to a ReaderSDK payment. ReaderSDK does not allow itemization currently, per the docs.
I am trying to use react-native-paytm for payment gateway, I followed the steps what was there in react-native-paytm module, but it is not working for me, Even i don't Know the error and Don't Know how to resolve it
Here is the code that what i have done
payNow(){
// alert("payNow")
var details = {
generationUrl: "https://cinealerts.com/webservices/paytm/xxx.php",
validationUrl: "https://cinealerts.com/webservices/paytm/xxx.php",
mid: "my mid", // Prod
industryType: "Retail", //Prod
website: "APP_STAGING", //prod
channel: "WAP",
amount: "5",
orderId: "12345678",
requestType: "DEFAULT",
email: "hussian#gmail.com",
phone: "7777777777",
theme: "merchant",
custId: "9988344556",
};
paytm.startPayment(details);
}
when i click on button it will call the paynow function, in payNow function one popUp is open and automatically it closed with out showing anything, I don't know how to resolve this issue, and even i don't know that what is the issue.
Any one please give me suggestions that how to resolve this issue, Any help much appreciated.
A better documented fork:
https://github.com/sujayjaju/react-native-paytm
It worked for me on Android. I still need to test on iOS
Make sure you are using the correct values of paytm parameters.
In your code, you are using APP_STAGING in website parameter. It should be APPSTAGING.
To check the correct parameters value of website parameter, follow the steps :-
Log into your Paytm dashborad - https://staging-dashboard.paytm.com
Go to settings->profile
Check value of Website
Also I need to add one more parameter to get it working i.e. mode:'stage'.
I am sharing my code that worked fine for me in android.
var details = {
mid: "my_mid",
industryType: "Retail", //Prod
website: "APPSTAGING", //prod
channel: "WAP",
amount: 100,
orderId: "ORDER_12390",
email: "abc#gmail.com",
phone: 7777777777,
custId: "CUST-12879",
checksumhash: "checksum generated using paytm sdk",
callback: "my_call_back_url",
mode:'stage',
};
// alert(JSON.stringify(details));
paytm.startPayment(details);
Environment:
Worklight 6.1.0.2
dojo 1.9.4
We have created a hybrid app using Worklight 6.1 for android, iOS and windows8 platform. Now we would like to add and show End User License Agreement (EULA) window to the user, when the app first time launch. It should have Accept and Decline button. If user tap on Accept button, then he should be able to use the app.
I would like to know, how can we achieve this using Worklight 6.1.
Any help on this, will be much appreciated.
FYI there is nothing specific here to Worklight.
You could implement this in any number of ways w/out ever using any Worklight API whatsoever.
You could achieve it for example like this (untested code - you'll need to experiment):
In main.js create some global variable eulaAccepted:
var eulaAccepted;
// You will need to handle this property using HTML5 Local Storage so that it will persist for the next time the app is launched, and have the app act accordingly.
Then, in wlCommonInit():
function wlCommonInit() {
if (!eulaAccepted) {
displayEula();
} else {
displayApp();
}
}
In displayEula():
function displayEula() {
// either display a dialog using `WL.SimpleDialog`...
// Or maybe custom HTML with "accept" and "not accept" buttons
WL.SimpleDialog.show(
"Eula Agreement", "your-eula-text-here",
[{text: "Accept", handler: acceptEula },
{text: "Reject", handler: rejectEula}]
);
}
Handle the result:
function acceptEula() {
eulaAccepted = true;
... // Some code that will store the `eulaAccepted` variable using HTML5 Local Storage API
displayApp();
}
function rejectEula() {
// Display some other custom HTML instead of your app.
// Maybe also additional logic to try again to accept the Eula...
}
I have a shopify site that is hooked up with Lightspeed via MerchantOS. I need new products added via MerchantOS to be hidden upon sync/creation. All help is appreciated.
The Shopify product creation via API allows you to define the product visiblity (published / hidden). You should dig into MerchantOS to make sure when doing a POST to create a product at your Shopify store, it has the following property:
"published": false
Create a new, but unpublished product:
POST /admin/products.json
{
"product": {
"title": "Burton Custom Freestlye 151",
"body_html": "<strong>Good snowboard!<\/strong>",
"vendor": "Burton",
"product_type": "Snowboard",
"published": false
}
}
I'm building a sort-of clone of CoverItLive in Rails 3.1 and want to have the stream of comments automatically update. I'm using a partial in the view to display comments. There's a lot of info out there on doing UJS and AJAX wit forms or buttons or links in Rails, but I can't find any specific examples for what I need to do.
I'm assuming that .ajax() is the best approach, but I've never used it before and not sure if I need to provide .js.erb files when using this particular function? Could I just have the controller send JSON back to the client and go from there, or is there a better approach in rails?
This is what I'm thinking so far, based on what I read at another question:
setInterval(function() {
$.ajax({
type: 'GET',
url: ''<%= comments_path(:json) %>'',
data: {
data: "comments_data"
},
cache: false,
success: function(result) {
if (result == "true"){
alert("true");
}else{
alert("false");
}
}
});
}, 3000);
As an alternative you should look into Private Pub, a gem that Ryan Bates has put togeather. See a screencast about it on railscasts.
The trouble with your solution is now often you server will be hit unnecessarily, i guess it depends on the number of concurrent users you thing will be viewing this page.
if you do go down your route the .js.erb could just have a somthing like this in it:
$('#id_of_area_to_replace').html("<%= escape_javascript(render"comments/index") %>")
This would replace the whole area else you could just append new comments to the bottom of the area