square / connect-php-sdk

PHP client library for the Square Connect APIs
https://developer.squareup.com/docs
Apache License 2.0
114 stars 55 forks source link

Example #106

Closed atmangel closed 4 years ago

atmangel commented 4 years ago

Hi, please i need example to charge a credit card (credit card number, expiry and cvv) and create the customer (email, address, city, etc.), thanks

havenwood commented 4 years ago

I'd suggest going through the first half of the Payment Form Walkthrough, but then use the Payments API with PHP to charge card token nonce in place of the Node.js instructions in the walkthrough.

For customer creation, see the PHP SDK docs for creating a customer and the corresponding CreateCustomer body parameters.

havenwood commented 4 years ago

Please join us in our developer community chat if you have any other questions!