paymaya-js-sdk-v2's People
Forkers
vinceramcesoliveros moreishi rjarce brymartinez wutijat hownaskie hubertursua princeanire jhnferraris fafadongz granulatedsugar leoxwebdev jofftiquez sageprosell jorrelangpaymaya-js-sdk-v2's Issues
Invalid authentication credentials
still getting the issue even after the fix. I am using the script tags method to implement. This code works on sandbox mode but not in production. we already supplied the live API keys. even Android and iOS SDKs has this problem.
This is how I implemented on web, I am using vanilla JS for this.
<script src="https://unpkg.com/[email protected]/dist/bundle.js"></script>
<script>
$('#payMayaPay').click(function(){
const myExampleObject = {
"totalAmount": {
"value": paymaya_pay_amount,
"currency": "PHP",
},
"redirectUrl": {
"success": paymaya_pay,
"failure": payment_failed,
"cancel": paymaya_expired
},
"requestReferenceNumber": refNum,
"metadata": {}
};
PayMayaSDK.init('pk-live-apikey',false);
PayMayaSDK.createSinglePayment(myExampleObject);
})
</script>
Apply styles to iframe and it's content
Hello, everyone ๐
Currently, as I see from documentation - there are a list of styles that I can apply to the button, when I use createCreditCardForm
method (color, text color, text);
is it possible to allow customise whole form?
For example, in our case - we need to center a button, but we can't because of styles-limitations and we can't change styles inside embed iframe.
Thank you!
mays
I can't install the addon using NPM
๐ Describe the Bug
Within the directory of my project, I was trying to run this command npm install --save paymaya-sdk
. The addon was not installed successfully. I tried to install the addon using the npm command in different node versions but I am getting the same error below (Please see the image)
๐ฌ Minimal Reproduction
Step 1 : cd to the app directory
Step 2: run npm install --save paymaya-sdk
๐ Actual Behavior
The addon was not installed successfully. Tried in different node versions.
๐ค Expected Behavior
The addon should be able to install properly without error even the lower versions of node.
๐ Environment
ember-cli: 2.6.2
node: [
node/8.11.1
node/8.12.0
node/10.20.1
node/12.0.0
node/12.14.0
]
os: darwin x64
โ Additional Questions
Is there a possibility that this addon is able to run/use/install using the node version 8.11.1
?
PayMayaSDK.init does not honor optionality of isSandbox parameter
It seems isSandbox
isn't really optional in init
, rather it defaults to undefined
, which might break checks that focus on finding a true
value for isSandbox
.
Re: #5 (#5 (comment))
Invalid authentication credentials using live API keys
Hi. we followed the integration process using the SDK but upon using the live API keys, we are getting Unauthorized error (401). This is the response we are getting when testing the SDK. We already tried this on all five SDK APIs but to no avail (createCheckout, createWalletLink, createSinglePayment, addTransactionHandler, createCreditCardForm).
This is the response that we get.
POST https://pg-sandbox.paymaya.com/payby/v2/paymaya/link 401 (Unauthorized)
{
code: "K003"
error: "Invalid authentication credentials. Kindly verify if the key you are using is correct."
reference: "56510e27-30d5-47a6-897c-9adab17f6f33"
}
seems we are still being redirected to sandbox link.?
This is how we implemented
const myExampleObject = {
"totalAmount": {
"value": paymaya_pay_amount,
"currency": "PHP",
},
"redirectUrl": {
"success": paymaya_pay_url,
"failure": payment_failed_url,
"cancel": paymaya_expired_url
},
"requestReferenceNumber": refNum,
"metadata": {}
};
PayMayaSDK.init('pk-our-live-api-key',false);
PayMayaSDK.createSinglePayment(myExampleObject);
Callback for `addTransactionHandler` doesn't clear itself
I try to use createCreditCardForm
within a vue.js component.
Once component mounted - we init PaymayaSDK
, then createCreditCardForm
and addTransactionHandler
with a callback (which receive token and save it in DB).
The problem:
- once we added a card we remove our component from DOM, but we can't clear callback that was added by library within
createCreditCardForm
method; - When we try to add another card, we again open a component, init
PaymayaSDK
, usecreateCreditCardForm
andaddTransactionHandler
; - Our callback triggers more than 1 time, because previous listeners weren't removed.
Suggested solution:
- after callback has beed called inside
addTransactionHandler
, remove old listener.
public addTransactionHandler(callback: (arg: string) => void) {
try {
this.checkIfInitialized();
this.checkData({}.toString.call(callback) === '[object Function]');
window.addEventListener('message', (event) => {
if (event.origin === this.eventOrigin) {
const data = JSON.parse(event.data);
callback(data.paymentTokenId);
}
});
} catch (e) {
console.error(e);
console.error('SDK: addTransactionHandler(callback) - callback must be a function')
}
}
Blocked by CORS policy
Creating an app using Paymaya and works before using sandbox API keys. Suddenly, today i got blocked by CORS Policy with message
Access to fetch at 'https://pg-sandbox.paymaya.com/checkout/v1/checkouts' from origin 'http://jularbs.com:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
no code was changed. Is the error on my side or on paymaya?
ShippingType enum not importable in definitions
play
Issue: problem on testing my own public api key
I have generated my API secret and public at Maya Business Dashboard - Checkout & Invoicing
So I cloned this project and see that you only use the Public Key so what i did is to test it out with my own public key, However it is giving me this kind of error in the console and won't let me proceed.
From URL: https://pg-sandbox.paymaya.com/checkout/v1/checkouts
{
"error": "Invalid authentication credentials. Kindly verify if the key you are using is correct.",
"code": "K003",
"reference": "bdd5260f-f7ef-42a0-9472-dcdf757f6a35"
}
I wonder why the project redirecting me to v1 instead of v2 everytime i use my public key but if i keep the default or the project sample public key it is redirecting to this link: https://payments-web-sandbox.paymaya.com/v2/checkout?id=
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.