Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
express-payment-request
Advanced tools
💸 A middleware for Express which can be used to serve the Payment Request API.
A middleware for Express which can be used to serve the Payment Request API.
Hey, you. Yes you. Don't use this for anything. It's currently highly experimental and most likely doesn't do what you'd like it to.
Check back soon though. ;)
Using yarn
:
yarn add express-payment-request
To authenticate Apply Pay payment requests using express-payment-request
, transactions between the express
middleware and Apple Pay must be properly signed using the Apple Pay Merchant Identity Certificate.
E-Mail Address
, CA Email Address
(this can be the same as the Email Address
), and set the Common Name
to something memorable, like "Apple Pay 2048 RSA".merchant_id.csr
generated by Apple.password
that you'll want to use for the certificate you'll be using to sign your mutual TLS with Apple Pay.
password
you decided on at the beginning of this section.private.p12
.At this stage, your RSA certificate for secure TLS transactions between your server and Apple Pay has been recognized, and you have merchant_id.cer
and your private.p12
on the desktop.
Before going onto the next section, be sure you have OpenSSL installed. You can verify it exists by executing openssl -v
in your Terminal.
merchant_id.cer
into a .p12
certificate.On your Desktop, execute the following commands:
# generate .pem
openssl x509 -in merchant_id.cer -inform DER -out merchant_id.pem -outform PEM
# generate .key (requires access password)
openssl pkcs12 -in private.p12 -nodes -out private.key -nocerts
# generate p12
openssl pkcs12 -export -out merchant_id.p12 -inkey private.key -in merchant_id.pem
The resulting file merchant_id.p12
can now be used to sign transactions with Apple Pay.
To verify the correctness of your certificate, you can use cURL
:
curl --data '{"merchantIdentifier":"your.merchant.identifier","domainName":"yourdomainname.com","displayName":"MyStore"}' --cert-type P12 --cert ~/Desktop/merchant_id.p12 --pass "your-password-here" https://apple-pay-gateway.apple.com/paymentservices/startSession -v
Upon success, curl should print a valid payment nonce negotiated with Apple Pay. 🚀
FAQs
💸 A middleware for Express which can be used to serve the Payment Request API.
We found that express-payment-request demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.