I'm using the Adaptive Payments API to redirect the user from my web-site to a PayPal page to finish the payment. I've hooked this up with a 3rd party Invoicing service which listens via IPN.
For some reason, the Billing Address does not appear in the IPN data, and so does not appear on the invoice. Is there any flag I need to pass to the Adaptive Payments API to tell it to pass along the Billing Address?
Here's how I'm currently using the API:
var receiverList = new ReceiverList
{
receiver = new List<Receiver>
{
new Receiver(purchase.TotalPrice)
{
email = _configurationReader.GetStringValue("PayPalEmail")
}
},
};
var envelope = new RequestEnvelope("en_US");
var payRequest = new PayRequest(envelope, ActionType.Pay.GetApiString(), cancelUrl, CurrencyCode.USDollar.GetApiString(), receiverList, returnUrl);
var service = new AdaptivePaymentsService();
var response = service.Pay(payRequest);
purchase.PayPalPaymentId = response.payKey;
return CreatePayPalRedirectUrl(response);
PayPal does not send billing addresses to sellers. That's one of the advantages for buyers using the system...they don't have to share any billing info with all the different sellers they buy from.
The only address you would ever get from PayPal (in an API response, IPN notification, etc.) would be a shipping address, and that would only be provided if included in the original transaction.
Related
I'm trying to create a conference call with a Moderator and several participants one of which is a bot.
The bot is controlled by the Moderator via a back channel so it can Say things etc to the conference call.
I setup the conference call when the Moderator calls in from a web client and then dial in the other participants and the bot using CallResource.CreateAsync with a callback url so I know which conference to add them to.
The bot needs to get a parameter so it knows which moderator to listen to for instructions.
However, I can't seem to pass any parameters to the bot (which is currently being triggered via another TwiML app) from the C# API using CallResource.CreateAsync.
Adding a participant to the call (callbackUrl adds the connected call to the conference) - this works fine:
var to = new PhoneNumber(callData.PhoneNumber);
var from = new PhoneNumber(_twilioSettings.PhoneNumber);
var callbackUrl = GetConnectConferenceUrl(callData.CallToken);
var url = new Uri(callbackUrl);
var participantCallResource = await CallResource.CreateAsync(to, from, url: url);
Adding the bot to call (Phone number is setup in Twilio as a TwiML app with a webhook back to my server) - how do I pass parameters to the TwiML app?
var toBot = new PhoneNumber(botNumber);
var fromBot = new PhoneNumber(_twilioSettings.PhoneNumber);
var botCallbackUrl = GetConnectConferenceUrl(callData.CallToken, isBot: true);
var botUrl = new Uri(botCallbackUrl);
var botCallResource = await CallResource.CreateAsync(toBot, fromBot, url: botUrl)
How do I pass parameters to a TwiML bin or Webhook or phonenumber from C#?
Do I need to add the bot in to the call a different way?
Parameters are passed either on the To or on the Url per https://www.twilio.com/docs/voice/how-share-information-between-your-applications
I believe your use case would put it on the Url. Assuming you have a moderatorId:
var botCallbackUrl = GetConnectConferenceUrl(callData.CallToken, isBot: true, moderatorId);
var botUrl = new Uri(botCallbackUrl);
where GetConnectConferenceUrl adds the parameter you need.
I've used it on the To line for a Client endpoint, so that looked like
var toBot = $"{new PhoneNumber(botNumber)}?moderatorId={moderatorId}";
I'm working on a Adaptive card in bot framework v3 using c#. On my Adaptive card I have created a AdaptiveShowCard action. In that show card I have binded a choice options which has a value of user email ID. On click of submit of that show card I have to initiate a group chat.
Problem: when submit button is clicked, I'm getting the values of email id's in Activity object, now i have to use that Id's and create a deeplink URL
Challenge: I'm unable to make a Deeplink url call from my message controller.
Code adaptiveshowcard:
new AdaptiveShowCardAction()
{
Title = "Group chat",
Card = Groupchat // having choice structure
},
Message controller:
if (activity.Name == "composeExtension/onCardButtonClicked")
{
try
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
HttpWebRequest request = WebRequest.Create("https://teams.microsoft.com/l/chat/0/0?users=User#domain.onmicrosoft.com") as HttpWebRequest;
}
}
Please suggest how to initiate a group chat
C# package used: Google.Apis.Calendar.v3
I am making a sharing a calendar to an not google account.
No invite notification sent to that account event the Response = OK
var rule = new AclRule
{
Role = "owner",
Scope = new AclRule.ScopeData
{
Value = acb#yahoo.com,
Type = "user"
}
};
var service = await GetCalendarService();
var request = service.Acl.Insert(rule, calendarId);
request.SendNotifications = true;
AclRule addedRule = await request.ExecuteAsync();
So could anybody help me about that?
Thanks,
I found that google calendar API dont have any options to send notification to non google email.
Moreover, the calendar must be made as public first. This one can not modify by API. And I dont want to make it as public also.
Here's document from google
I'm integrating PayPal Send Invoice Reminder through PayPal Invoicing API.
Here is my code,
sandbox url
var sandbox = "https://api.sandbox.paypal.com/v1/invoicing/invoices/";
notification object,
var notification = new Notification
{
subject = "Payment Reminder",
note = "This is a reminder that payment is due on " + InvoiceDueDate,
send_to_merchant = true
};
Invoice Id and Generated Access Token,
var invoice_id = "your invoice id";
var access_token = "your generated access token";
PayPal Send Reminder Api needed above values for Send Reminder Task but how to get response using above values and also how to pass these values(parameters) to rest API of PayPal.
Thanks, Kaushik.
Send Reminder PayPal Example:
No matter what I do I'm always getting the same AuthorizationException for the following request on sandbox with valid keys:
REQUEST:
{"CreditCard":
{
"CVV":"123",
"ExpirationMonth":"10",
"ExpirationYear":"2016",
"Number":"4111 1111 1111 1111"
},
"Amount":195.000000,
"OrderId":"bb461ebb-b894-4716-9ea2-7317f9e8c8d9",
"MerchantAccountId":"xxxxx",
"TaxAmount":0,
"Type":{},
"CustomFields":
{
"correlation_id":"bb461ebb-b894-4716-9ea2-7317f9e8c8d9"
},
"Options":
{
"StoreInVault":true,
"SubmitForSettlement":true
},
"CustomerId":"2012f124-2f00-477f-85fb-f6bc3f5fe275"
}
Here's the code that I'm using to create this request:
var request = new TransactionRequest
{
OrderId = message.Id.ToString(),
Amount = message.Amount,
CustomerId = message.CustomerId.ToString(),
MerchantAccountId = message.MerchantAccountId,
Options = new TransactionOptionsRequest
{
SubmitForSettlement = message.SubmitForSettlement
}
};
string expirationMonth = message.ExpirationMonth.GetValueOrDefault().ToString(CultureInfo.InvariantCulture);
string expirationYear = message.ExpirationYear.GetValueOrDefault().ToString(CultureInfo.InvariantCulture);
request.CreditCard = new TransactionCreditCardRequest
{
Token = message.CreditCardId.ToString(),
CardholderName = message.CardholderName,
Number = message.CardNumber,
ExpirationMonth = expirationMonth,
ExpirationYear = expirationYear,
CVV = message.CVV
};
request.Options.StoreInVault = true;
var result = _gateway.Transaction.Sale(request);
What I'm missing?
I work at Braintree. If you have any other questions, feel free to contact our support team directly.
This error can happen when you're attempting to use a merchant account that your user doesn't have access to. In this case, the merchant account ID you're passing (which you X'd out above) doesn't exist.
Take a look at our support pages for more information on merchant account IDs:
Merchant Account ID
With Braintree, you can have multiple merchant accounts processing via the same single gateway account. You could have multiple locations, multiple businesses, and multiple currencies all setup and processing under one single account. This makes it easy to keep track of all of your processing with unified reporting and access and can even save you money.
You can find the values for all merchant accounts in your gateway account by following these steps:
Log in to the Control Panel
Navigate to Settings -> Processing
Scroll to the bottom of the page to find the section labeled Merchant Accounts
If I only have a single merchant account, do I still need to send this value with API requests?
No, this is an optional value with all API requests that support it. If you only have a single merchant account, there's no need to include this value. If you have more than one merchant account you can specify which merchant account should be used with each API request. If you omit this value, all requests will automatically be routed through your default account.