cryoutsolutions / paypalpayment
laravel-paypalpayment 是一个简单的包,帮助您处理直接信用卡支付
v0.2.0
2014-03-05 10:56 UTC
Requires
- php: >=5.3.0
- ext-curl: *
- ext-json: *
- illuminate/support: 4.1.x
- paypal/merchant-sdk-php: v2.5.106
This package is not auto-updated.
Last update: 2024-09-28 15:06:11 UTC
README
laravel-paypalrecuringpaymentscreditcard 使用 Laravel 4 安装处理直接信用卡支付和定期配置文件
通过 Composer 安装此包。将以下内容添加到您的 composer.json
文件中:
"require-dev": { "cryoutsolutions/paypalpayment": "dev-master" }
接下来,运行 composer update
以下载它。
将服务提供者添加到 app/config/app.php
文件中的 providers
数组中。
'providers' => array( // ... 'Cryoutsolutions\Paypalpayment\PaypalpaymentServiceProvider', )
最后,将别名添加到 app/config/app.php
文件中的 aliases
数组中。
'aliases' => array( // ... 'Paypalpayment' => 'Cryoutsolutions\Paypalpayment\Facades\PaypalPayment', )
## 配置:php artisan config:publish cryoutsolutions/paypalpayment
## 示例代码
## 创建定期配置文件
$startDate= "2014-02-28T00:00:00:000Z";
$frequency = 1;
$period = "Month";
$amount=1;
$initialAmount=1;
$description='recurring payment';
$creditCard = Paypalpayment::CreditCardDetailsType();
$creditCard->CreditCardNumber = "4745425765192217";
$creditCard->CreditCardType = "Visa";
$creditCard->CVV2 = "962";
$creditCard->ExpMonth = 02;
$creditCard->ExpYear = 2014;
Paypalpayment::CreateRecurringProfile($startDate,$frequency,$period,$amount,$initialAmount,$creditCard, $description);
您将收到如下回答
object(CreateRecurringPaymentsProfileResponseType)[141]
public 'CreateRecurringPaymentsProfileResponseDetails' =>
object(CreateRecurringPaymentsProfileResponseDetailsType)[150]
public 'ProfileID' => string 'I-GK8UGKHHL712' (length=14)
public 'ProfileStatus' => string 'PendingProfile' (length=14)
public 'TransactionID' => string '97X027701D1414537' (length=17)
public 'DCCProcessorResponse' => null
public 'DCCReturnCode' => null
public 'Timestamp' => string '2014-02-28T10:29:04Z' (length=20)
public 'Ack' => string 'Success' (length=7)
public 'CorrelationID' => string 'c4f4c798cc28d' (length=13)
public 'Errors' => null
public 'Version' => string '106.0' (length=5)
public 'Build' => string '9777850' (length=7)
赞助商:therapick