Skip to content

Instantly share code, notes, and snippets.

View cyrilselasi's full-sized avatar
🎯
Focusing

Cyril Selasi cyrilselasi

🎯
Focusing
View GitHub Profile
@cyrilselasi
cyrilselasi / wxpay_refund_notify_decryption.ts
Last active May 30, 2020 18:52
WeChat Pay Refund Notification Request Info Decryption Algo
import * as crypto from "crypto";
import { parseString } from "xml2js";
/**
*
* @param merchant_secret Merchant Secret for WeChat Merchant Account
* @param req_info Raw Encrypted String from WeChat Refund Notification Payload
*
* (1) Do base64 decoding on encrypted string A to get encrypted string B
* (2) Do md5 on the merchant key to get a 32-bit lowercase key
### Keybase proof
I hereby claim:
* I am cyrilselasi on github.
* I am cyriljnr (https://keybase.io/cyriljnr) on keybase.
* I have a public key ASAhNIrzZ8M1mR33W4b9xA9KHtHWP_DwhJTbw3m9Y1kcnwo
To claim this, I am signing this object:

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@cyrilselasi
cyrilselasi / AfricanMap.svg
Created October 21, 2015 15:26
African Map SVG with divisions made in regions not countries. (North, East, West & South Africa)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.