百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

sample-code-php

> 编程语言
开源

此仓库包含可运行的代码示例,这些示例展示了 php 与 Authorize.Net API 的集成

184 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

此仓库包含可运行的代码示例,这些示例展示了 php 与 Authorize.Net API 的集成

PHP Sample Code for the Authorize.Net SDK

This repository contains working code samples which demonstrate PHP integration with the Authorize.Net PHP SDK.

The samples are organized into categories and common usage examples, just like our API Reference Guide. Our API Reference Guide is an interactive reference for the Authorize.Net API. It explains the request and response parameters for each API method and has embedded code windows to allow you to send actual requests right within the API Reference Guide.

Using the Sample Code

The samples are all completely independent and self-contained. You can analyze them to get an understanding of how a particular method works, or you can use the snippets as a starting point for your own project.

You can also run each sample directly from the command line.

Running the Samples From the Command Line

  • Clone this repository:
    $ git clone https://github.com/AuthorizeNet/sample-code-php.git
  • Run composer with the "update" option in the root directory of the repository.
    $ composer update
  • Run the individual samples by name. For example:
    $ php PaymentTransactions/[CodeSampleName]

e.g.

    $ php PaymentTransactions/authorize-credit-card.php

Installation Notes

Note: If during "composer update", you get the error "composer failed to open stream invalid argument", go to your php.ini file (present where you have installed PHP), and uncomment the following lines:

extension=php_openssl.dll
extension=php_curl.dll

On Windows systems, you also have to uncomment:

extension_dir = "ext"

Then run composer update again. You might have to restart your machine before the changes take effect.

What if I'm not using Composer?

We provide a custom SPL autoloader. Just download the SDK and point to its autoload.php file:

php
require 'path/to/anet_php_sdk/autoload.php';

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHP

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言