Ebay sdk: local pickup shipping service - ebay-sdk

I am trying to make LocalPickup delivery. Options are:
ShippingService = "LocalDelivery",
LocalPickup = true,
ShippingServiceCost = new AmountType
{
currencyID = currency,
Value = 0
},
ShippingServicePriority = 1,
FreeShippingSpecified = false,
LocalPickupSpecified = true
Listing is created on the sandbox but has not 'local pickup' as delivery option. ShippingService = "LocalPickup" doens't work at all. Have any ideas what parameters should be changed?
Unfortunately, Ebay dev forum doesn't work

Related

LocalNotification in Xamarin Forms not always received

I’m developing a mobile app in Xamarin Forms.
I have develop local notifications using the latest versione of
https://github.com/thudugala/Plugin.LocalNotification
Many times notifications work great, but sometimes notifications are not received/sended or sometimes notifications are recevied all together in a wrong moment compared to the scheduled time.
Most of the tests were made on iOS on real devices.
The code I use is more or less this:
var notification = new NotificationRequest
{
NotificationId = idNotific,
Title = "myApp",
Description = txt,
ReturningData = "myData",
Schedule =
{
NotifyTime = timeToTake,
RepeatType = NotificationRepeat.TimeInterval,
NotifyRepeatInterval = new TimeSpan(intervalDays,0,0,0)
}
};
LocalNotificationCenter.Current.Show(notification);
if (Device.RuntimePlatform == Device.iOS)
{
var notificationNext = new NotificationRequest
{
NotificationId = idNotific,
Title = "myApp",
Description = txt,
ReturningData = "myData",
Schedule =
{
NotifyTime = timeToTake,
}
};
LocalNotificationCenter.Current.Show(notificationNext);
}
For iOS, using TimeInterval, I had to add an extra schedule because otherwise the first notification is not sended.
The “idNotific” is a big integer number, “timeToTake” is a DateTime and “intervalDays” is a small integer.
I'm trying to figure out why they sometimes don't work properly.
I tried to understand if there is a something different from when notifications work and from then don't work, but apparently it's all the same.
Do you have any suggestions? Do you need more info?
Thanks
Luca

Using Rtweet's search_fullarchive in R

I am trying to use rtweet's search_fullarchive using my premium token registered at Twitter Developer. However, I got an error message of:
Warning: list(message = "Forbidden: Authentication succeeded but account is not authorized to access this resource.", sent = "2019-07-14T14:30:11+00:00", transactionId = "xxxxxxxxxx")
How do I get past this problem? Is there an error in the way i code?
I ensured my token is working well by testing it using httr's POST method and it worked completely fine.
I also tested my token using normal search_tweets, and also worked fine.
cons_key = "xxx"
cons_sec = "xxx"
acc_tok = "xxx"
acc_sec = "xxx"
app = "abc"
token = rtweet::create_token(app,cons_key,cons_sec,acc_tok,acc_sec)
manutd = search_fullarchive("manchester united",n=500,
fromDate = "201812010000",toDate = "201902010000",
env_name = app,token = token)
I expected a tibble dataframe as usually Rtweet's returns. However this is what i received:
"Warning: list(message = "Forbidden: Authentication succeeded but account is not authorized to access this resource.", sent = "2019-07-14T14:30:11+00:00", transactionId = "xxxxxxxxxx")"
data frame with 0 columns and 0 rows
To help anyone who might have trouble with the same thing, i'll write down a bit of explanation. Firstly, if you have registered a premium account, go to
To create the token, you need the App Name.
token = rtweet::create_token(app_name,cons_key,cons_sec,acc_tok,acc_sec)
To do query, you need the environment name.
search_fullarchive(q, n = 100, fromDate = NULL, toDate = NULL, env_name = "dev_name", safedir = NULL, parse = TRUE, token = token)
Hope it helps beginners or anyone who might have the same troubles.

Multiple Transactions Using Paypal .NET SDK

I have implemented Paypal ASP.NET SDK to carry out payments on my website, where the user pays for the items through their Paypal account.
What I would like to do is seperate products that the user has ordered into different Paypal transactions, so that when the client logs into Paypal they can see them as seperate itemised transactions.
The Paypal SDK suggests that this can be done, since the Transactions object is a collection. This is a snippet of my code where I am attempting to send multiple transactions through:
#region Get products
ItemList itemList = new ItemList();
if (_products.Any())
{
List<Item> payPalItems = _products.Select(p => new Item
{
name = p.Name,
currency = _currency,
price = p.Price.ToString("N"),
quantity = p.Quantity.ToString(),
sku = p.Sku
}).ToList();
itemList.items = payPalItems;
}
#endregion
#region Personal Details
// Address for the payment
Address billingAddress = new Address();
if (_personalDetails != null)
{
billingAddress.line1 = _personalDetails.Address1;
billingAddress.line2 = _personalDetails.Address2;
billingAddress.state = _personalDetails.County;
billingAddress.city = _personalDetails.City;
billingAddress.postal_code = _personalDetails.PostCode;
billingAddress.country_code = _personalDetails.CountryCode;
}
#endregion
#region Payment Amount Details
Details paymentDetails = new Details();
paymentDetails.shipping = _delivery.ToString();
paymentDetails.subtotal = _products.Sum(p => p.Total).ToString("N");
paymentDetails.tax = _tax.ToString();
Amount paymentAmount = new Amount();
paymentAmount.currency = _currency;
// Total must be equal to sum of shipping, tax and subtotal.
paymentAmount.total = ((decimal.Parse(paymentDetails.subtotal) * (100 + _tax) / 100) + _delivery).ToString("N");
paymentAmount.details = paymentDetails;
#endregion
#region Transaction --> Sending multiple transactions here...
// A transaction defines the contract of a payment - what is the payment for and who is fulfilling it.
Transaction trans1 = new Transaction();
trans1.amount = paymentAmount;
trans1.item_list = itemList; // Currently sending the same list of items for testing.
trans1.invoice_number = "Surinder Split Order 1";
Transaction trans2 = new Transaction();
trans2.amount = paymentAmount;
trans2.item_list = itemList; // Currently sending the same list of items for testing.
trans2.invoice_number = "Surinder Split Order 2";
// The Payment creation API requires a list of transactions.
List<Transaction> transactions = new List<Transaction>();
transactions.Add(trans1);
transactions.Add(trans2);
#endregion
When carrying this out, I get the following error response from Paypal: "Only single payment transaction currently supported".
It seems Paypal does not allow the seperation of transactions from one request. If this is the case, is there any other way to carry out what I am trying to achieve?

Azure Application Insight: Custom data not recorded when Timestamp or StartTime is set

I found a strange issue while sending data using custom code. No data appeared in the browser until I figured out it had something to do with how I send it. If I manually set the StartTime or Timestamp of a Telemetry class the data never shows up.
In the code below, only the event with name "None" shows up. Widening the time range of the filter in the browser dashboard does not help.
Is it not possible to send historical data to application insights with a custom datetime stamp?
I need it because my telemtry data comes from a single server and is then persisted to multiple destinations like Application Insights, SQL server en blob storage for later processing.
var rt = new RequestTelemetry
{
Name = "StartTime",
Duration = TimeSpan.FromSeconds(8),
StartTime = DateTime.Now.AddDays(-1)
};
telemetry.TrackRequest(rt);
rt = new RequestTelemetry
{
Name = "Timestamp",
Duration = TimeSpan.FromSeconds(8),
Timestamp = DateTime.Now.AddDays(-1)
};
telemetry.TrackRequest(rt);
rt = new RequestTelemetry
{
Name = "Both",
Duration = TimeSpan.FromSeconds(8),
Timestamp = DateTime.Now.AddDays(-1),
StartTime = DateTime.Now.AddDays(-1)
};
telemetry.TrackRequest(rt);
rt = new RequestTelemetry
{
Name = "None",
Duration = TimeSpan.FromSeconds(8),
};
telemetry.TrackRequest(rt);

RGA (CRAN) - "get_accounts" gives wrong accounts

Note it says: RGA package from CRAN. Which is different from "rga"
package from Github. Nevertheless, i have the same problem with both
packages. But for the question let's stick just to RGA from CRAN.
**The questions is updated and edited, because the first aid was not enough. I still have the problems with the accounts.
I work with 2 emails for accesing Google Analtics. Each one has access to diffent accounts within Google Analytics. I use email A at my house, and email B at work.
Now, im using RGA (from CRAN) within R, and at my house i need to access the Google Analytics accounts from the Email B (work email, that has access to specific Google Analytics accounts).
The problem is that when using this code:
For Account 1: Email A (home email):
client.id1 <- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
client.secret1 <- "bbbbbbbbbbbbbb"
ga_token1 <- authorize(client.id1, client.secret1, cache = TRUE, verbose = getOption("rga.verbose", FALSE))
get_accounts(start.index = NULL, max.results = NULL, ga_token1, verbose = getOption("rga.verbose", FALSE))
For Account 2: Email B (work email):
client.id2 <- "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
client.secret2 <- "yyyyyyyyyyyyyyy"
ga_token2 <- authorize(client.id2, client.secret2, cache = TRUE, verbose = getOption("rga.verbose", FALSE))
get_accounts(start.index = NULL, max.results = NULL, ga_token2, verbose = getOption("rga.verbose", FALSE))
What ever, i use at my Home computer, i get the same accounts fro both my Home Gmail accounts for GA, and my Work Gmail account for GA.
Is there any step that i'm missing?
I want to get the accounts for email B, but no matter what i just get the accounts related with email A.
I've delated all my Google Analytics API projects (from A and B), and recreated the API for Email B. But no matter what, i just get the accounts for email A.
**My Google Api project was created with B (the email with the access to the desire account). But i just see accounts related to A.
You need to create two different tokens which will have the authorization for the email you authenticate via the Google login page. Its also a lot easier to get data via the method described in the readme (?rga.open), but for your examples:
##authenticate with first email
ga_token1 <- authorize(client.id, client.secret, cache = TRUE, verbose = getOption("rga.verbose", FALSE))
##authenticate with second email
ga_token2 <- authorize(client.id, client.secret, cache = TRUE, verbose = getOption("rga.verbose", FALSE))
Then to get accounts:
get_accounts(start.index = NULL, max.results = NULL, ga_token1, verbose = getOption("rga.verbose", FALSE))
get_accounts(start.index = NULL, max.results = NULL, ga_token2, verbose = getOption("rga.verbose", FALSE))
But I would do it this way:
## authenticate under first email
rga.open(instance = "ga1")
## authenticate under second email
rga.open(instance = "ga2")
Then to call data such as profiles:
profiles1 <- ga1$getProfiles()
profiles2 <- ga2$getProfiles()
It appears because tokens stored in the same cache file (.ga-token.rds by default), i.e. second token replaced first. When tokens are used it read into cache file.
To Solve this issue you should set cache = FALSE or define specific cache path for each token. Examples below:
First, disabling cache:
work_token <- authorize(client.id1, client.secret1, cache = FALSE)
home_token <- authorize(client.id2, client.secret2, cache = FALSE)
Second, different cache paths:
work_token <- authorize(client.id1, client.secret1, cache = "work.token")
home_token <- authorize(client.id2, client.secret2, cache = "home.token")
To check it:
list_profiles(token = work_token)
list_profiles(token = home_token)

Resources