Accept Credit Card API PHP

I must be missing something. I am trying to get setup to accept payment on my site. I am using PHP.

The problem I have is there seems to be no tutorial on setting this up. I see the PHP API SDK and the Web Payments API. I have learned that the Web Payments SDK creates a token to use in the Payments API from the tutorial: Take a Card Payment with Web Payments SDK. However this is with Node.js setup, is there anything like this example available for the PHP SDK?

All I really need a credit card input, validation, and processing. I don’t need any of the other features for the API right now. There seems to be a lot of documentation for the API, but very limited on the different scenarios.

:wave: You can checkout Square’s sample apps for additional examples on how to utilize Square APIs, which includes payment processing samples in PHP. :slightly_smiling_face:

1 Like

I tried using the example provided but I’m getting an error “payment failed”.

I’m not sure why I’m getting this error. I setup everything exactly like it was listed in detail instructions provided but I keep getting the same error.

I’m not sure if you have any other guide on using the api adk in php.

1 Like

Hi there. Were able to find a way to fix this? I agree with you on the lack of information on web payment forms. Why is there no PHP implementation I don’t get it.

The examples are total crap. I am able to run the payment screen locally on my laptop using a nodejs but I can’t run others because it requires an SSL website. Then I uploaded everything to a webhosting site with nodejs and SSL, but still so many errors and installation issues.

All we want is some PHP form with a server piece that is WORKING. Nothing else.

Have you seen our PHP example for accepting payments? :slightly_smiling_face: