|
At least I presumed it was a hardware switch. The iPhone 8 has a switch on the side to mute all sounds. Only, it does not mute all sounds. There have been a few cases where the sound still played even with the "hardware" switch set to off.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
So, Apple gets to decide what gets muted and what doesn't?
Surprised?
|
|
|
|
|
ZurdoDev wrote: There have been a few cases
LOL. you have examples of those few vases ?
I think you can set favorites in your contacts that will override the switch.
I'd rather be phishing!
|
|
|
|
|
Maximilien wrote: LOL. you have examples of those few vases ? I don't know why that's funny; however, yes, one was during an ad.
Maximilien wrote: I think you can set favorites in your contacts that will override the switch. Quite possibly. But that proves the point, it is not actually a hardware switch.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
I'm working on a website for a client and at some point a visitor is going to have to pay.
I've never done this before, so I was kind of saving this for last.
Then the customer said they wanted to use Mollie, a payment platform.
So I just took a look at it, created an account, and within an hour I created a test payment.
They even have a test token so I don't have to transfer real money and instead I can pick my payment method and select the status I want returned (failed, pending, done, etc.) so I can test all scenario's.
Here's something I never thought I'd say, but their documentation is actually pretty useful and they return meaningful error messages.
Switching to real payments should be as easy as changing the token.
I'm in no way affiliated with Mollie and as a consumer I hate these kind of platforms because they usually make me pay to pay, but this has been the easiest third-party integration I've ever had.
Of course I've only used it for an hour and they haven't suddenly changed their entire API without notice yet, but so far I'm genuinely impressed
|
|
|
|
|
Cool - thanks - been looking for a simple way to take payments for a web site.
Any gotchas at all?
Keep your friends close. Keep Kill your enemies closer.
The End
|
|
|
|
|
This is what I found, nothing serious, but it'll get you started.
Before you start, make sure you actually set at least one payment method in your profile or you'll get an exception from the web API "no payment methods found" (which is fairly descriptive, except when you're completely new).
Also, when you create a payment you get a response with some URL's, one of those is the URL that your users should visit to complete their payment, but you're responsible for redirecting the user (which makes sense, because their web API can't do it for you). The docs don't mention this very explicitly.
And you get updates on your payments through an optional webhook. I haven't tried it yet, but I do want to implement it, but the problem is that your localhost can't accept HTTP requests from Mollie, so you'll need to run this code on a server that can. I plan on creating a simple Azure Function that updates my dev database, so I can make a request on my localhost, get an update on Azure, but still see the change on localhost. The docs do mention this problem with webhooks.
Here's my very first try-out code for Mollie, almost worked on the first try. Without the webhook for updates.
public async Task<IActionResult> Pay()
{
using (var client = new HttpClient())
{
var id = Guid.NewGuid().ToString();
var request = new
{
amount = new
{
currency = "EUR",
value = "1.00"
},
description = "Test payment",
redirectUrl = $"https://localhost:[port]/OrderCompleted?id={id}",
metadata = new
{
id
}
};
var json = JsonConvert.SerializeObject(request);
var content = new StringContent(json, Encoding.UTF8, "application/json");
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "test_[your code]");
var response = await client.PostAsync("https://api.mollie.com/v2/payments", content);
var responseContent = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode)
{
string url = JsonConvert.DeserializeObject<dynamic>(responseContent)._links.checkout.href;
return Redirect(url);
}
}
return Ok();
} There's also an third party library, but for me it doesn't get much more difficult than this so I don't need it
|
|
|
|
|
Super cool! Thanks.
Keep your friends close. Keep Kill your enemies closer.
The End
|
|
|
|
|
Some days ya just wanna live forever.
|
|
|
|
|
|
It's refreshing to see a positive review every now and then!..oh, and Happy Belated Birthday!
It's also refreshing to work with a new API and 'it just works'...even better when it exceeds your expectations! Good to hear!
"Go forth into the source" - Neal Morse
|
|
|
|
|
kmoorevs wrote: Happy Belated Birthday What a coincidence. It's my belated birthday today too.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
kmoorevs wrote: oh, and Happy Belated Birthday Thanks
kmoorevs wrote: It's also refreshing to work with a new API and 'it just works' Until today I thought of this as a fairy tale
|
|
|
|
|
Well, I am annoyed that they named their service after my dog!
...and they misspelled it as well!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Why did you name your dog after a payment service and spelled it wrong?
|
|
|
|
|
If it "just works"...holy Mollie?
|
|
|
|
|
|
It doesn't have The Netherlands most used payment type, iDeal
|
|
|
|
|
Well, it looks like I'm going to be dragged (kicking and screaming) into Linux development so I can address some glaring problems with Kodi.
If one is doing Python-3 dev, I'd be interested in hearing about it. I'm thinking I'll just create a Linux VM for dev work to avoid screwing up my desktop OS.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
|
I don't want to do it in a Windows VM. Or on Windows itself. Or even near a window.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I also have a Linux system and just run it in a bash shell. Either way it's quite a fun language to play with.
|
|
|
|
|
Of all the scripting languages I've played with, I've quite enjoyed Python, but I do really detest the whole self thing, though you could use this as well. The hardest thing for me to remember is that self is the first parameter of a class' method and all fields belonging to the class are self.fieldName as well, like:
self.cancel = False
def initializeHardware(self):
I found getting used to the indentation style instead of braces was easy enough and familiar enough having played with FP languages.
And the online documentation is decent and lots of guidance (some of it good, some of garbage) can be found on SO.
So, basically, unless I was going to look at .NET Core, Python is definitely my first language choice on Linux. Being more comfortable with Windows, I prefer using VS to do the Python development and then WinSCP it over to the Linux box. The same code can be tested and run as long as you're not doing something too OS or hardware dependent.
Latest Article - A Concise Overview of Threads
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
|
Sounds like a pR0n movie title to me.
|
|
|
|