Google pay Api split revenue/profit? - stripe-payments

Is there any api available where I can split revenue similar to stripe
# Create a PaymentIntent:
curl https://api.stripe.com/v1/payment_intents \
-u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
-d "amount"=10000 \
-d "currency"="usd" \
-d "transfer_group"="{ORDER10}"
# Create a Transfer to a connected account (later):
curl https://api.stripe.com/v1/transfers \
-u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
-d "amount"=7000 \
-d "currency"="usd" \
-d "destination"="{{CONNECTED_STRIPE_ACCOUNT_ID}}" \
-d "transfer_group"="{ORDER10}"
# Create a second Transfer to another connected account (later):
curl https://api.stripe.com/v1/transfers \
-u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
-d "amount"=2000 \
-d "currency"="usd" \
-d "destination"="{{OTHER_CONNECTED_STRIPE_ACCOUNT_ID}}" \
-d "transfer_group"="{ORDER10}"
The stripe fees is too expensive for me.
then I look at google pay, I found out that they don't have any fees. But they don't have any feature that can split revenue.
Question: Is there any payment processor that has split revenue/profit functionality with a cheap fees?

Related

letsencrypt with nginx blacklabelops on azure

I successfully got https://github.com/blacklabelops/letsencrypt and the nginx running on my virtual machine on azure.
In Docker I hae now 2 containers. One with my go application running and being reachable on port 8080 on the web, one with the nginx container of blacklabelops. this one is binded to ports 80 and 443. I followed the tutorial "Letsencrypt and Nginx" on github for the steps 1-3 and replaced "http://yourserver" in step 3 with the url of my go application and port 8080 where I can reach it via http.
When I call https and the domain nothing happens. Ports 8080,443 and 80 are open in the azure network security group.
Can you give me a hint?
Update: I can post the commands _i performed here.
I have "my" application running on http://myapp.westeurope.cloudapp.azure.com:8080
I performed 1:
sudo docker run -d \
-p 80:80 \
-p 443:443 \
-e "SERVER1REVERSE_PROXY_LOCATION1=/" \
-e "SERVER1REVERSE_PROXY_PASS1=172.17.0.2" \
-e "SERVER1CERTIFICATE_DNAME=/CN=Chatbot/OU=Kundenservice/O=myapp.westeurope.cloudapp.azure.com/L=Frankfurt/C=DE" \
-e "SERVER1HTTPS_ENABLED=true" \
--name nginx \
blacklabelops/nginx
Than I performed 2:
sudo docker run --rm \
-p 80:80 \
-p 443:443 \
-v letsencrypt_certificates:/etc/letsencrypt \
-e "LETSENCRYPT_EMAIL=mymail#azure.com" \
-e "LETSENCRYPT_DOMAIN1=myapp.westeurope.cloudapp.azure.com" \
blacklabelops/letsencrypt install
I did 3:
sudo docker volume create letsencrypt_challenges
And 4:
-p 443:443 \
-p 80:80 \
-v letsencrypt_certificates:/etc/letsencrypt \
-v letsencrypt_challenges:/var/www/letsencrypt \
-e "NGINX_REDIRECT_PORT80=true" \
-e "SERVER1REVERSE_PROXY_LOCATION1=/" \
-e "SERVER1REVERSE_PROXY_PASS1=http://myapp.westeurope.cloudapp.azure.com" \
-e "SERVER1HTTPS_ENABLED=true" \
-e "SERVER1HTTP_ENABLED=true" \
-e "SERVER1LETSENCRYPT_CERTIFICATES=true" \
-e "SERVER1CERTIFICATE_FILE=/etc/letsencrypt/live/myapp.westeurope.cloudapp.azure.com/fullchain.pem" \
-e "SERVER1CERTIFICATE_KEY=/etc/letsencrypt/live/myapp.westeurope.cloudapp.azure.com/privkey.pem" \
-e "SERVER1CERTIFICATE_TRUSTED=/etc/letsencrypt/live/myapp.westeurope.cloudapp.azure.com/fullchain.pem" \
--name nginx \
blacklabelops/nginx

Instagram log-in not work

I try to log-in via instagram, but instead i get this error. I can't find solution for this, so please help me to solve this. I get this error when try to send request like this:
curl -F 'client_id=CLIENT_ID' \
-F 'client_secret=CLIENT_SECRET' \
-F 'grant_type=authorization_code' \
-F 'redirect_uri=AUTHORIZATION_REDIRECT_URI' \
-F 'code=CODE' \
https://api.instagram.com/oauth/access_token
{"error":{"message":"Error validating application. Invalid application ID.","type":"OAuthException","code":101,"fbtrace_id":"HBZxDDhSbzu"}}

How to convert curl into python

I am reading the instagram api , there is command of curl , I have been trying to read through what curl -F means, but somehow I am getting nowhere...
Appreciate if anyone can provide any insight on this topic.
curl -F 'client_id=CLIENT_ID' \
-F 'client_secret=CLIENT_SECRET' \
-F 'grant_type=authorization_code' \
-F 'redirect_uri=AUTHORIZATION_REDIRECT_URI' \
-F 'code=CODE' \
https://api.instagram.com/oauth/access_token
-F is for --form, but for most curl tasks I will often enter the curl into a web converter.
Check out https://curl.trillworks.com/
Looks like there is a library that does it too, but I've not used it: https://github.com/spulec/uncurl

Mailgun API cURL Using HTML, Does it accept head and body tags?

I am trying to send an email using Mailgun API through curl, I have an html email so all I did was change text to html from the sample given. I added my template but for some reason I notice it doesn't accept head and body tags, right?
I have the url with the newsletter please help me http://bit.ly/10B63PU
Here on the documentation the sample code for sending with api:
http://documentation.mailgun.com/quickstart-sending.html#send-via-api
I learned I had to use --form-string not just replace text with html. The example below is directly from mailgun, before they only listed the text version for sending mail.
http://documentation.mailgun.com/api-sending.html#examples
curl -s --user 'api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0' \
https://api.mailgun.net/v2/samples.mailgun.org/messages \
-F from='Excited User <me#samples.mailgun.org>' \
-F to='foo#example.com' \
-F cc='bar#example.com' \
-F bcc='baz#example.com' \
-F subject='Hello' \
-F text='Testing some Mailgun awesomness!' \
--form-string html='<html>HTML version of the body</html>' \
-F attachment=#files/cartman.jpg \
-F attachment=#files/cartman.png
You need to specify the HTML payload to pass HTML, otherwise it will assume it is plain text.
curl -s --user 'api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0' \
https://api.mailgun.net/v2/samples.mailgun.org/messages \
-F from='Excited User <me#samples.mailgun.org>' \
-F to=baz#example.com \
-F to=bar#example.com \
-F subject='Hello' \
-F text='Plain text version of my awesome newsletter' \
-F html='<body>My awesome newsletter</body>'
Thank you for asking the question - it might not seem as obvious!

Command Line Tool to Disable PDF Printing

Does anyone know of a "FREE" command line tool that can lock a pdf from a user being able to print it. I need to be able to put this in a batch to loop through a folder and disable printing from adobe standard and reader. Is this possible to do it from command line with any tool?
First, pdftk:
You can use pdftk for (available for Linux, Unix, Mac OS X and Windows) to set an "owner password":
pdftk \
input.pdf \
output semi-protected.pdf \
owner_pw "supersecret"
Result is this, for example:
pdfinfo semi-protected.pdf | grep Encrypted:
Encrypted: yes (print:no copy:no change:no addNotes:no)
You can modify the command to additionally require a user password to open the PDF:
pdftk \
input.pdf \
output semi-semi-protected.pdf \
owner_pw "supers3cr3t" \
user_pw "s3cr3t"
You can modify the command to (selectively) "allow" other user actions:
pdftk \
input.pdf \
output semi-semi-protected.pdf \
owner_pw "supers3cr3t" \
allow ModifyContents \
allow CopyContents \
allow ScreenReaders \
allow ModifyAnnotations
Result may be this, for example:
pdfinfo semi-semi-protected.pdf | grep Encrypted:
Encrypted: yes (print:no copy:yes change:yes addNotes:yes)
Second, podofoencrypt:
Commandline example:
podofoencrypt \
--rc4v2 \
-o "supers3cr3t" \
-u "s3cr3t" \
--edit \
--copy \
--editnotes \
--fillandsign \
--accessible \
--assemble \
input.pdf \
semi-protected.pdf
Big, fat caveat:
You should be aware, that this way of 'protecting' PDF files is by no means super-secure. There are quite a lot of PDF cracker software utilities out there which easily un-protect your PDF files. This method is only a very basic means to prevent most noobie computer users to mess with your files.
In addition, see also
Third, qpdf:
in Martin Schröder's answer!
qpdf can do this:
qpdf \
--encrypt \
"user-password" \
"owner-password" \
40 \
--print=n \
-- \
infilename \
outfilename
or even
qpdf \
--encrypt \
"user-password" \
"owner-password" \
128 \
--print=non \
--accessiblity=y \
--force-V4 \
--modify=form \
-- \
infilename \
outfilename

Resources