2016-11-14 2 views
0

Laravel 용 payone (https://www.payone.de/) API의 간편한 래퍼가 있습니까? 패키지를 판매하는 회사는 하나 뿐이며 오픈 소스는 없습니다. 나는 어떤 도움을 주셔서 감사합니다.Laravel - Payone

+0

공식 PHP 패키지 인 https://github.com/ionas/PHP-SDK가있는 것 같습니다. Laravel에서 잘 작동합니다. –

답변

0

당신은 Omnipay을 고려해야합니다 http://omnipay.thephpleague.com/

때문에 : 그것은 독립적 인 게이트웨이가

PayOne에 대한 Omnipay 플러그인이 있습니다 Laravel뿐만 아니라 심포니, YII, 잘 작동합니다. Payone 클래스의 세부 정보를 확인하여 보내야하는 다른 정보가 있는지 확인해야하지만 작동해야하는 몇 가지 샘플 코드가 있습니다. Payone 게이트웨이는 계정 설정 방법에 따라 여러 가지 방법으로 작동 할 수 있습니다.

 
$gateway = Omnipay::create('Payone_ShopServer'); 
$card = new CreditCard(array(
      'firstName' => 'Example', 
      'lastName' => 'User', 
      'number' => '4111111111111111', 
      // ... etc 
     )); 

$transaction = $gateway->purchase(array(
    'amount'  => '10.00', 
    'currency'  => 'USD', 
    'description' => 'This is a test purchase transaction.', 
    'card'   => $card, 
)); 

$response = $transaction->send(); 
if ($response->isSuccessful()) { 
    echo "Purchase transaction was successful!\n"; 
} 
// At this point you should get $response->getTransactionReference() 
// and store that or something similar.