7 posts / 0 new
Last post
alekseyzhurbits...
Token Based Payments

I have a problem with Token Based Payments.
I have changed payeezy.js for working in sandbox (change url), then successfully got payeezyToken.
But when I try to make a payment "authorize" I get error "Access denied invalid base64encoded token"

My request example:
POST https://api-cert.payeezy.com/v1/transactions
Host: api-cert.payeezy.com
Content-Type: application/json
apikey: dh7hzAQ3qK4WbZqSvm3jAGINM3qj977P <- My API Key
Authorization: N2JlMTAzMDM2YjEzZDg3MTc2Njg3OGU2YWE0YWRiNDQzZDMzYWVjZGIzNTU2MzcxN2FhYzkzZmVjZWY0YTAxMg==
nonce: 1521219918
timestamp: 1429879670000
token: 4d3e3110e261c2bc <- My Merchant Identifier

{"method":"token","transaction_type":"authorize","amount":"101","currency_code":"USD","token":{"token_type":"payeezy","token_data":{"value":"xKTii\/b8qnnWcJDgiXDrYdYwgUF80e9+XBuTH0BUobKHHrULqsu3HV7VOcgza1V3modemLYj0NYNUOSGVOdJywlsm9Pzp2MhPkpeEfJUn15B6bTzI\/aYMhoK4Wi6OTxaYIIFqXBAu18IDdvjh25QDkcpl3i7rJOajP9e2Mdi8nI="}}}

Authorization, nonce and timestamp I am counting in hmacAuthorizationToken() (https://github.com/payeezy/payeezy_direct_API/blob/master/payeezy_php/example/src/Payeezy.php)

What did i miss?


pramodrao2872
Re: Token Based Payments

The Payeezy token is a Time-bound Single use token that should be used within 5 minutes of generating the token value. 

For using Payeezy token, the Tokenize Payment API is used within 5 minutes of generating the token and

1) token_type is set to payeezy

2) token value parameter is taken from response from GET token

3) The authorize transaction for payeezy token is used within 5 minutes.

If you need to use a permanent token, please generate a token using Tokenize Credit Cards API with Transarmor parameter and use this token accordingly for Tokenize Payment API.

 

If you have followed above methods and still having issues, let us know if this is for PHP or Payeezy.js.

 

Best Regards,

Payeezy Team


alekseyzhurbits...
Re: Token Based Payments

1) token_type is set to payeezy

token_type = payeezy in the payload and "Supported Token Types" - payeezy on the ENTITLEMENTS tab from My APIs.

2) token value parameter is taken from response from GET token

I use payeezyToken from hidden field on my form after Payeezy.createToken finished the job.

3) The authorize transaction for payeezy token is used within 5 minutes.

The entire transaction from submiting the form until the error takes less than 10 seconds.

I do not know where the problem is. What "Access denied invalid base64encoded token" means? Problem with "token" header?


pramodrao2872
Re: Token Based Payments

Hi,

Sorry for the delay in response.

We can setup a quick call to further debug and assist you.

Let us know.

Thanks,

Pramod


nileshdafeniles...
Re: Token Based Payments

That means your API key or token is invalid or expired. Please validate these values.

 


rajeshvuta3708
Re: Token Based Payments

Hi,
I started working with the Payeezy API. Our company has already entered into an agreement/made purchase to use PayEezy.

I have successfully created a token by sending the test credit card details. Now when I try to call the https://api-cert.payeezy.com/v1/transactions to make a 'purchase', I get a 401 - Unauthorised error.

I am coding in C#

My questions are:
1. Do I need to send a certificate along with my request (or is it only for IOS apps)? Mine is C# so I am assuming its the Direct API.
2. If I already have the token generated for the credit card, can i directly use the 'purchase' method or do I need to use 'authorize'?
3. How can I set up the same token to be used for recurring payments?

Appreciate your help.

Regards,
Rajesh


atulparmar983
Re: Token Based Payments

Hello Rajesh, 

Feedback:

1. Do I need to send a certificate along with my request (or is it only for IOS apps)? Mine is C# so I am assuming its the Direct API.

If you are using C# then it will be direct API call. You can use tokenize method if you are not PCI.I see you have registered but you need to create your sandbox app. After you create your app, you will get APIKey/Secret. 

checkout our guide to get started: https://github.com/payeezy/get_started_with_payeezy/blob/master/get_started_with_payeezy042015.pdf 

2. If I already have the token generated for the credit card, can i directly use the 'purchase' method or do I need to use 'authorize'?

You can directly use 'purchase' with token.

3. How can I set up the same token to be used for recurring payments?

Use recurring payments API https://developer.payeezy.com/recurringsplitpayments/apis/post/transactions/%7Bid%7D