We're trying to integrate with Google Pay for Passes to add transit tickets to Google Pay, using C# and the "skinny" flow as described here:
"Skinny" JWT variation
We're also using the C# example as provided here: google-pay/passes-rest-samples
The REST calls for transit all succeed and the JWT token is generated, however when trying to add the ticket to Google Pay by using the link "https://pay.google.com/gp/v/save/{jwt_generated}" it just fails with a generic error saying "Something went wrong. Please try again later.". We've tried by just using the link directly, by adding a JS button on a website and even tried loading from a native android application, they all come back with the same error. When using JS button, the error callback returns "SERVICE_ERROR" with no further details. On google console we can see the transit class status as APPROVED.
Any details on what we might be missing would be helpful as it's not clear where the problem is originating from.
There isn't enough information to help you out here. But the best course of action is to request support with the following URL: https://support.google.com/pay/merchants/contact/instore_merchants
The team should be able to look into your specific issues.
I had same issue using passes-rest-samples.
I've missed changing SERVICE_ACCOUNT_EMAIL_ADDRESS in Config.cs, so resolved it by changing it to right service account.
this.SERVICE_ACCOUNT_EMAIL_ADDRESS = "ServiceAccountEmail#developer.gserviceaccount.com"; // CHANGEME
Related
I am searching for a way to obtain the current code in my Google Authenticator app. for a specific account.
Please note that I'm not looking for embedding Google 2FA to any of server-side application - I guess it has been already well-documented.
I am trying to get the same current code shown in my own Google 2FA app. (by providing my Google credientials ofcourse) so I can make my app fully automated even when logging in (to a specific system/website) without asking for the code each time I start the app.
Thanks by now.
UPDATE:
Even if I can't find any answer or simply "there is no way", there is still a way even if it's too ugly.
Running an ios/android simulator (and configure it once by installing the Google Auth app) and simulate the mouse clicks over it and then capturing a screenshot and decoding the code from the image would be much of a work but also can actually work. I'm just trying to find a better way, if there is any.
You could solve this by generating the OTP code locally using a library such as OTP.Net. Simply save the secret locally, and add it to .gitignore if using git.
Then you can make a code on demand like so:
using OtpNet;
var totp = new Totp(secretKey);
var totpCode = totp.ComputeTotp();
I'm trying to figure out how to let a user redeem a discount/ promo code in Stripe.
Looking at the documentation I think should retrieve the code using PromotionCodeService() so I can then get the discount amount to apply to the subscription, something like
var service = new PromotionCodeService();
service.Get("promo_1HMxuf2eZvKYlo2CmGXSyhRx");
But I cannot seem to get access to that service as I can the ProductService(), CouponService() etc.
Can anyone point me to any example code on where this has been done before, I'm sure it's a common enough thing.
Thanks in advance
Generally the integration would be
you accept some input from the user for the user-facing code they entered
use https://stripe.com/docs/api/promotion_codes/list#list_promotion_code-code to look up the promo code objects related
create the user's subscription and pass PromotionCode in the SubscriptionCreateOptions with the ID of one of the objects(https://stripe.com/docs/billing/subscriptions/discounts/codes#applying-promotion-codes)
But I cannot seem to get access to that service as I can the ProductService(), CouponService() etc
That almost certainly means you're using an old version of the stripe-dotnet library from before when that service was added, so upgrading should fix that. https://github.com/stripe/stripe-dotnet/blob/master/CHANGELOG.md#37290---2020-08-05
I am building an application using accept js and C# SDK of authorize.net. here, i am using accept js token to make a credit card payment over authorize.net and able to create transaction and customer profile successfully. but when i tried to create a subscription with customer profile id and payment profile id, i got "E00040 Record Not Found" error response.
I also tried to create subscription with another token after creating transaction but getting "E00114 Invalid OTS Token" error response.
What would cause authorize.net to return an these errors?
Looking forward for your quick response.
I was having this problem today, although I was doing PHP on the backend instead of C#. I called into their tech support and here's what I found:
Their production endpoints are actually pretty overloaded on server resources compared to their sandbox unfortunately, at least as of Aug, 2018. This can lead to this misleading Invalid OTS Token error, which can also have several other causes. The tech explained to me that if you have a submit button on the payment form that generates the token and then immediately submits the transaction, that you should add some kind of sleep call (on PHP, that's sleep(5);, for instance). We tried and got it to work on 4 seconds, minimum, but only intermittently. He told me if it fails after a 4 or 5 second sleep call, to reattempt that call one more time after waiting another 2 seconds, before you give up and recommend the customer call your call center or use your other support channels.
In the sandbox, they won't care if you're not using the cert.pem file in your transactions. Not so in production -- you need to ensure you've got that loaded. You can get that file off of Github if you search on the official Authorize.Net files.
Long shot, but I'd like to fiddle with ViaGogo API (C# library more precisely). ViaGogo has a well documented public API, documentation is avaliable here.
Problem is, you need to authenticated as it usually happens with this kind of APIs: usually, you find a section of the website, maybe in your profile section, where you can obtain keys, secrets and so on (this happens for example on Facebook or Amazon).
As for ViaGogo, I only found a link that points to a Google Form: this form asks for info about advertising and affiliation on a complete different level of what I need, I won't publish anything read via API. Furthermore, there's no field to leave an e-mail address.
Their C# library seems pretty popular as far as I can tell from downloads from NuGet; I wonder how all these thousands of devs succesfully called that API.
Has anyone succesfully obtained authentication info from ViaGogo?
According to note in registration form, you have to wait for 30 days for their reply.
For more help you can contact them on following contacts:
E-mail: affiliate#viagogo.com
Telephone: +442075532777
Or
http://www.viagogo.com/in/help
There doesn't seem to be any way around this registration according to their website and the api itself -- an appID and password is required. You may try your luck emailing them at Affiliate.Team#viagogo.com -- see this issue on github where the possibility of getting an account via email is discussed: https://github.com/viagogo/developer.viagogo.net/issues/24
I am using Google calendar API with my ASP.NET application, and it was working fine till morning but suddenly I was getting lots of exception from Google calender
“The specified value is not a valid quoted string”
I am not sure if Google has changed any service from their end. Please help in this regards, it is really creating problem on server. Currently I am using the Google calendar V3 having DLL version as 1.6.0.67 and I want to update my code for their new DLL and not getting proper documentation for this. Please hep if any both knows about the documentation.
It should work now. There was a problem in the Calendar API and how it set the etag property. I'm working on a change (https://codereview.appspot.com/96320045/) to make the library more robust and avoid throwing errors in this case.