-
Notifications
You must be signed in to change notification settings - Fork 20
/
doc.go
23 lines (18 loc) · 904 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
Package applepay abstracts all the Apple Pay flow.
It support features such as RSA-encrypted tokens (used in China), elliptic curve-encrypted token, full signature verification and protection against replay attacks.
Sample usage:
ap, err := applepay.New(
"com.processout.test",
applepay.MerchantDisplayName("ProcessOut Test Store"),
applepay.MerchantDomainName("store.processout.com"),
applepay.MerchantCertificateLocation("cert-merchant.crt", "cert-merchant-key.pem"),
applepay.ProcessingCertificateLocation("cert-processing.crt", "cert-processing-key.pem"),
)
// Create a new session
sessionPayload, err := ap.Session("https://apple-pay-gateway.apple.com/paymentservices/startSession")
// Decrypt a token
token, err := ap.DecryptResponse(res)
A working example can be found in applepay/app.go. It requires a registered domain and valid certificates to work.
*/
package applepay