norfolkmustard / applepayjs Goto Github PK
View Code? Open in Web Editor NEWWorking draft of ApplePayJS with php
License: GNU General Public License v3.0
Working draft of ApplePayJS with php
License: GNU General Public License v3.0
On line 9 of apple_pay_conf.php
:
define('PRODUCTION_MERCHANTIDENTIFIER', openssl_x509_parse( file_get_contents( PRODUCTION_CERTIFICATE_PATH ))['subject']['UID'] ); //e.g. merchant.com.mydomain or merchant.com.mydomain.shop
Let's say my name is merchant.com.name
should this line be:
define('PRODUCTION_MERCHANTIDENTIFIER', openssl_x509_parse( file_get_contents( PRODUCTION_CERTIFICATE_PATH ))['subject']['merchant.com.name'] ); //e.g. merchant.com.mydomain or merchant.com.mydomain.shop
Thank you!
I have created the payment processing certificate from apple using CSR from authroze.net. Where to use this certificate in the code?.
你是个好人
I have integrated the Applepay JS into my Website following your guide. My merchantValidation object looks like :
{
"epochTimestamp":1499863886166,
"merchantSessionIdentifier":"44xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx24",
"nonce":"7xxxxxx7f",
"merchantIdentifier":"91xxxxxxxxxxxxxxxxxxxxxxx0B",
"domainName":"abc.com",
"displayName":"demoName",
"signature":"308006092a864xxxxxxxxxxxxx000000"
}
However, on passing this to session.completeMerchantValidation, I keeping getting Payment Not Completed Error and the payment sheet keeps closing immediately.
Note: I am executing my code in my local enviroment which is different from the one being passed in the domainName in the merchantValidation object.
Please help me out.
When I run this command and input the password, it said "can't read password"
openssl pkcs12 -in ApplePayMerchantIdentity_and_privatekey.p12 -out ApplePay.crt.pem -clcerts -nokeys
Enter Import Password:
Can't read Password
I'm sure I input my password correctly.
I am getting the error ""error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown" when trying to call the curl request for a new session. I created the pem files like mentioned in this repo. If someone can help that would be great, thanks!
Hey I'm trying to implement your code here with bluesnap payment gateway, would love your help, I can pay for your time. Thanks!
I have done everything needed, I have it running on a verified domain with a SSL certificate, but it still always giving me payment not complete.
{
"epochTimestamp":1631532235832,
"expiresAt":1631535835832,
"merchantSessionIdentifier":"S............3",
"nonce":"6........6",
"merchantIdentifier":"DA.....2E",
"domainName":"Company.com",
"displayName":"Company Name",
"signature":"4 ...... 0",
"operationalAnalyticsIdentifier":"B2E",
"retries":0
}
I have checked the epochTimestamp and expiresAt
when I convert the epochTimestamp to time and date I get this date
epochTimestamp -----> Fri, 13 Mar 53671 22:50:32 +0000
CurrentDate -----> 13-Sep-2021 11:33:16
When you remove the last 3 digits from the epochTimestamp it gives the correct time.
In my code it reaches CompleteMerchantValidation then cancels right after that
onPaymentAuthorized and everything else runs before the session even begins
4337829420:error:06FFF07F:digital envelope routines:CRYPTO_internal:expecting an rsa key:/AppleInternal/Library/BuildRoots/a0876c02-1788-11ed-b9c4-96898e02b808/Library/Caches/com.apple.xbs/Sources/libressl/libressl-2.8/crypto/evp/p_lib.c:300:
i have executed these commands
1.openssl pkcs12 -in ApplePayMerchantIdentity_and_privatekey.p12 -out ApplePay.key.pem -nocerts
2.openssl rsa -in ApplePay.key.pem -out ApplePay.RSA.key.pem
please help me with this issue
Hi,
This may be question ,not a issue.I don't where to ask the questions and comments.
I have created the payment processing certificate from apple using CSR from cybersource. Where to use this certificate .In my case cybersource is going to decry-pt the data from apple.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.