question

eithan avatar image
eithan asked eithan answered

i want to pay to clover without login in php in web api.

I have created a php page when someone insert credit card detail in it and click on submit button then i want to pay amount to clover by curl. For this I am using GET /v2/merchant/{mId}/pay/key but when i hit this by curl in php . it gives repose 401 unauthorized.

10 |2000

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

Mark Mullan avatar image
Mark Mullan Deactivated answered

Hi @eithan,

You'll need to send an OAuth token along with your request to GET /v2/merchant/{mId}/pay/key in order to receive a 200 response.

https://docs.clover.com/build/oauth-2-0/

10 |2000

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

eithan avatar image
eithan answered

Hi mark,

but for get token i need to go to URL sandbox.dev.clover.com/oauth/authorize?clientid={appId(s)}&redirecturi={your site's redirect URL} where clover ask for username and password for login. but i don't want this way to login .

I want to pay to clover like Dodirect payment in Paypal where user don't need to go to paypal website. Same like i also want to user don't go to clover website for pay . I want that user fill credit card detail in my website and on submit pay to clover.

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