PayMaya / PayMaya-Node-SDK

MIT License
18 stars 10 forks source link

Sandbox Public Facing Keys Not Working #9

Closed welmrqz closed 6 years ago

welmrqz commented 6 years ago

I've used all the public facing keys described in this page:

https://developers.paymaya.com/blog/entry/api-test-merchants-and-test-cards

In combination will all the test credit cards. From Party Sandbox 1 through 4, I'm getting "Merchant is not found" error

For Party Sandbox 5, I'm getting "Unknown origin" error.

Is there any updates in using the sandbox? I'm a bit stuck on this. I can't proceed to executing the payment itself when I can't even get a valid token.

Info: I'm using this library: https://cdn.paymaya.com/sandbox/paymaya.v1-0-1.min.js in my code.

screenshot-2018-10-03-02-42-46

screenshot-2018-10-03-02-43-51

Xavendith commented 6 years ago

Hi @welmarquez,

Apologies for the late response. Party sandbox 5 is the right key for your integration and we've identified an issue with one of our configs for sandbox integration/testing. We will be looking into this and hopefully give a response tomorrow.

Thank you for reporting this.

welmrqz commented 6 years ago

@Xavendith,

Sure, no worries. I'll keep an eye out!

Thanks!

Xavendith commented 6 years ago

Hi @welmarquez,

We couldn't give a timeline for this issue to be resolved as of now, so for the meantime I would suggest using our Checkout/Payment Vault APIs.

If you could give us more details regarding your use case we could suggest which of the APIs would best suit your project.

Cheers!

welmrqz commented 6 years ago

Why is your demo page working just fine using the Party Sandbox 5 Key?

(https://s3-ap-southeast-1.amazonaws.com/paymaya-js-demo/index.html)

Are you validating/whitelisting requests against certain domains?

How will I be able to proceed with payment if I can't get a valid token from PayMaya.createForm call?

The docs for JavaScript Tokenization looks pretty straightforward. I'm confused why a simple as requesting for a token is not working on a sandbox environment.

welmrqz commented 6 years ago

Please correct me if I'm wrong here.

screenshot-2018-10-04-15-03-43

I was under the impression that the field requestReferenceNumber value is the token returned from the PayMaya.createForm call.

Am I wrong? If so, what should be the value of requestReferenceNumber?

Otherwise, If I can't get any token, I can't really proceed can I?

Xavendith commented 6 years ago

Are you validating/whitelisting requests against certain domains?

Exactly. We've also got a whitelist to ignore domains for certain keys to allow for easier testing but it is currently in a queue for deployment. Party key 5 works for the demo since the demo's domains are in the whitelist.

A 'quick' workaround would be to add your domain to the whitelist but that would require you to speak with our business counterparts for onboarding

Xavendith commented 6 years ago

Please correct me if I'm wrong here.

screenshot-2018-10-04-15-03-43

I was under the impression that the field requestReferenceNumber value is the token returned from the PayMaya.createForm call.

Am I wrong? If so, what should be the value of requestReferenceNumber?

Otherwise, If I can't get any token, I can't really proceed can I?

The requestReferenceNumber is different from the token. How checkout works is that when a token is generated we return a url(checkoutUrl) that is linked to the token.

welmrqz commented 6 years ago

Okay then.

In the sample payload, in the sandbox environment, where should I be getting the value for requestReferenceNumber? Or could it be any string for the sandbox?

screenshot-2018-10-04-15-18-17

Xavendith commented 6 years ago

The requestReferenceNumber is a UUID generated by the merchant(you) for your own tracking of transactions.

The token represents the customers card details. When using Payment Vault/PayMayaJS we create a token using the card holders credentials. Your back-end would then use the token to execute the payment.

But when using our Checkout API we handle the token and execution of the payment for you. You would then be notified of the payment status(along with the requestReferenceNumber) using the webhook you register in our system.

Also we would be glad to receive any suggestions to further improve out documentation. :)

welmrqz commented 6 years ago

Got it. I tried manually doing Payment API calls from creating payment token to getting payment status and got a successful payment.

screenshot-2018-10-04-16-03-52

One final clarification before you close this ticket.

screenshot-2018-10-04-16-02-19

Does the basic auth uses the Secret Key? I tried all secret keys in https://developers.paymaya.com/blog/entry/api-test-merchants-and-test-cards but none of them works. I just copied and pasted the one in the sample payload of Payment API to get a success response.

As for the Docs, seems fine to me. But would be nice if those info you mentioned here could be included in the Docs.

Moving forward, for further clarifications, can you point me to a proper channel where to raise my concerns?

Xavendith commented 6 years ago

For Checkout API, you'd only need to use the public key for creating an execute checkout request and you'd need the secret key for void/refund requests :)

You could reach out to us through paymayadevs@voyager.ph(for both dev and onboarding queries), and for more details about merchant onboarding for our Checkout API https://paymaya.com/business/checkout/