-
-
Notifications
You must be signed in to change notification settings - Fork 310
Home
-1. Try to support WeChat payment and Alipay payment at the same time We can set the payment method selected by the user as event A, then when you support both methods, p (A) = 1/2 for one payment -2. Give the last two random reductions for the price We also set the price of payment as event B, then the probability of this price appearing is p (B) = 1/10 * 1/10 = 1/100 -3. Consider time We assume that the time the user purchases is also random. If we only consider the hours and minutes, the probability of this time is probably p (C) = 1/13 * 1/60 = 1/780 -4. Because of the choice of payment method, the amount of random deductions and the time of purchase, we can consider it independent Then the probability of error in this way is probably p (ABC) = p (A) * p (B) * p (C) = (1/2) * (1/100) * (1/780) = 1/156000 That is, if the above two points can be achieved, the probability of an error in one payment is about 150,000, and the probability of this error is acceptable if the purchase amount is reduced.
-After installation, do not rush to open it. It is safer to add it to the white list or remove it from the automatic black list. In the permission management software, it is allowed to start automatically. (This software will not take up too much memory resources, please rest assured)
-The first time you open it, you will be redirected to the notification permission page. Please give this software notification monitoring permission.
Level | How to use |
---|---|
Easy to use | Just set the URL of the push (please bring https: //, or http: //, such as http://mydomin.com/receipt) |
Use encryption | You need to check encryption in the settings, then select the encryption method (now only supports des), set the secret key |
Echo | Echo is used to make the server confirm that the device phone is online now |
Using Accessibility | Get More Details with Accessibility |
-Only des encryption is now supported. -des key must be 8 bits -After setting the encryption method and key, you can click the decryption instructions to view the decryption parameters (the default is that the decryption initialization vector is consistent with the secret key)
-Use to check the settings and set the echo server address -Is the address of the echo server related to the pushed address? Yes or no, this client will use socket.io to send an event named echo to the server, along with the deviceid of the device and the current time. This requires this server to be a socket.io server -How do I write an echo server to know that the device is offline? You can refer to app.js under the nodejs branch of the getreceipt-server project. E.g: `` ` var express = require ('express'); var app = express (); var server = require ('http'). Server (app); const io = require ('socket.io') (server);
global.deviceisonline = false; io.on ('connection', (socket) => { socket.on ('echo', (devicestr) => { device = JSON.parse (devicestr); global.deviceid = device ['deviceid']; global.deviceisonline = true; global.deviceconnectedtime = device ['connectedtime']; console.log ("new device_echo from" + device ['deviceid'] + "with time" + device ['connectedtime'] + "and socketid is:" + socket.id); }); socket.on ('disconnect', () => { global.deviceisonline = false; global.devicedisconnectedtime = new Date (); console.log ("device disconnect"); }); }); `` ` -What if I don't use node as the server language? For example I use php. You can use [phpsocket.io project] (https://github.com/walkor/phpsocket.io).
Platform | Note |
---|---|
Cloud Flash Payment | 1. If Cloud Flash Payment cannot receive the notification in the notification bar, please apply for the merchant's payment code |
Cloud Flash Payment | 2.Cloud Flash Payment supports Xiaomi Push, and the notification pushed by Xiaomi supports that payment code on the homepage without using the payment code of the merchant |
云 闪 付 | 3. If it is not the Xiaomi system, and you want to directly use the ordinary payment code on the home page (so that the payment number can be set), you can try Xiaomi [system-level push] (https://github.com / MiPushFramework / MiPushFramework / releases) This software supports Xiaomi push (but it is likely that you need root permissions to disguise your phone as a Xiaomi phone) |