question

Rohit Bhardwaj avatar image
Rohit Bhardwaj asked Rohit Bhardwaj answered

Developer Pay V2 API not working

Hi,
We are using Clover's V2 Pay API for the payments in our website. For the past couple of weeks the payments have stopped working and is not returning any data. I also verified it with the get single order API and expanding the payments array but I didn't get the payment's array field in the JSON response.

Did clover stop giving support to V2 Pay API and moved to V3 payments API or is there some problem in the V2 Pay API. Please help.

Developer Pay API
13 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

zgreathouse avatar image zgreathouse commented ·

We have not yet updated the Developer Pay API. Could you send a code snippet of your implementation, as well as a screenshot of the error you are receiving?

2 Likes 2 ·
Rohit Bhardwaj avatar image Rohit Bhardwaj commented ·
Hi,
Sorry for replying late, Here is the API which we use to post, https://api.clover.com/v2/merchant/$merchants_id/p... for payments and here is the array which we post to the API,
$fields=array("orderId"=>$order_id,
	      "expMonth"=>$data["expMonth"],
	      "cvv"=>$data["cvv"],
	      "amount"=>$data["amount"],
	      "currency"=> "usd",
	      "last4"=>$data["last4"],
	      "expYear"=>$data["expYear"],
	      "first6"=>$data["first6"],
	      "cardEncrypted"=> $data["cardEncrypted"]);

we are getting empty array as a response, so I cannot send you any detail about it. We are stuck because of payment and have to submit the app for approval in a couple of days.
Please advice.
0 Likes 0 ·
chanel avatar image chanel Rohit Bhardwaj commented ·

Hi @Rohit Bhardwaj,

Sorry for the late reply, but I'm not seeing any issues with DevPay on our end. I see that you're missing taxAmount and zipcode info. If you include that additional info, do you see the same empty response?

0 Likes 0 ·
Rohit Bhardwaj avatar image Rohit Bhardwaj chanel commented ·

Hi @Chanel,

I added taxAmount and zipcode in the data structure but I see the same empty response.


0 Likes 0 ·
Show more comments
ageiser avatar image ageiser commented ·

I am getting a 503 error for this endpoint. Are there any updates or known issues?

0 Likes 0 ·
Frank Faustino avatar image Frank Faustino ♦♦ ageiser commented ·

Are you still experiencing the 503 error for the Developer Pay API endpoint? There was a similar issue awhile back, please review this thread to see if it's relevant to your case: https://community.clover.com/questions/758/http-503-status-error-in-rest-v2-pay-api.html

If you have more questions or are still experiencing the 503 error, please create a new thread and we'll follow up there.

1 Like 1 ·
Danielle Cox avatar image Danielle Cox commented ·

Has your encryption key expired or do you get it every time?

0 Likes 0 ·
Rohit Bhardwaj avatar image Rohit Bhardwaj Danielle Cox commented ·

Thank you everyone for the help.

2 Likes 2 ·
Rohit Bhardwaj avatar image Rohit Bhardwaj Danielle Cox commented ·

We get new encryption key every time we are making an attempt to do payment using the APIs.

0 Likes 0 ·
Rohit Bhardwaj avatar image Rohit Bhardwaj Danielle Cox commented ·

We tested it by dumping values on the web and found out that the card encrypted value is empty, because we have somehow misplaced the /py/encrypt.py file. I think this is the reason we are not getting the encryption key for the card.

I had raised a ticket in 2017 regarding the same and here is the ticket and Mark Mullan commented on it with some python script which does not exists on the same url. However can you confirm whether this is the same python script which was earlier given to me as solution ?

Thank you.

0 Likes 0 ·
Frank Faustino avatar image Frank Faustino ♦♦ Rohit Bhardwaj commented ·

You can find the updated Developer Pay API Python example code here: https://github.com/cloverhackathons/DeveloperPayAPI/tree/master/python

The updated example more or less does the same as Mark Mullan's example code but has additional error checking.

0 Likes 0 ·

1 Answer

Rohit Bhardwaj avatar image
Rohit Bhardwaj answered

Hi @Frank Faustino,

We created a new python script which helped us in getting the correct card encryption value. After passing all the necessary details to the clover API we were able to get successful transaction.

Thank you for your help.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community