tappay / tappay-nodejs Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
I did not see the related method to call this API.
https://docs.tappaysdk.com/tutorial/zh/advanced.html#cap-cancel-api
呼叫下面的 /linepay router後express log 一直出現
payment-web:server Listening on port 3000 +0ms
POST /linepay 200 16.901 ms - 2
2019-02-15T02:31:21+0800 <warn> app.js:122 (TapPay.payByPrime.then.result) { status: 627, msg: 'Invalid arguments : backend_notify_url' }
2019-02-15T02:31:21+0800 <warn> app.js:116 (TapPay.payByPrime) null { status: 627, msg: 'Invalid arguments : backend_notify_url' }
想說是不是這個nodejs SDK只支援 DirectPay而已?
app.post('/linepay', urlencodedParser, function(req, res) {
TapPay.initialize({
partner_key:
'partner_0MF44WsoEhgw6ksLALjoia8GamlIGvaMhQRg2myKXqv0ih4UcpEW1MKb',
env: 'sandbox',
});
const payment_info = {
prime: req.body.prime,
merchant_id: req.body.merchant_id,
amount: req.body.amount,
currency: req.body.currency,
details: req.body.details,
cardholder: {
phone_number: req.body.phone_number || '',
name: req.body.name || '',
email: req.body.email || '',
},
//prettier-ignore
result_url: { backend_notify_url: 'https://localhost', frontend_redirect_url: 'https://localhost'}
};
// Promise Style
TapPay.payByPrime(payment_info)
.then(result => {
tlogger.warn(result);
})
.catch(error => {
tlogger.error(error);
});
res.send('ok');
});
請問我該怎麼使用 angular 7 framework 做 TPDirect.card.setup 與後續的TPDirect.card.getPrime 呼叫呢?我看到 tappay-nodejs 裡面有 TapPayServices.d.ts 定義檔案,但確定怎麼整合到 angular 裡面,請問有範例程式嗎?
感謝
Since this package is written in TypeScript, it will be nice if you can provide .d.ts files in the published npm package to allow other projects to reuse your type declarations. It should be as simple as adding a single line to tsconfig.json:
diff a/tsconfig.json b/tsconfig.json
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -7,6 +7,7 @@
"target": "es6",
"module": "commonjs",
"noImplicitAny": true,
+ "declaration": true,
"moduleResolution": "node",
"baseUrl": "./",
"paths": {
This package does not build on my machine, and I cannot test if the patch works for you.
The website doesn't have any reference link to their SDKs.. is this official sdk for tap payments ?
package.json says "SEE LICENSE IN LICENSE", but LICENSE file is an empty file.
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.