Exemplo n.º 1
0
 /**
  * @return ChargeFactoryInterface
  */
 public function getFactory()
 {
     if ($this->service == self::PAY_JP) {
         return PayJpFactory::forge($this->key);
     }
     if ($this->service == self::WEB_PAY) {
         return AsaoKamei\PayJp\WebPay\ChargeFactory::forge($this->key);
     }
     throw new InvalidArgumentException();
 }
Exemplo n.º 2
0
<?php

require_once __DIR__ . '/demo.inc.php';
$factory = \AsaoKamei\PayJp\PayJp\ChargeFactory::forge('sk_test_80c6bed519a1a374d29d3f6c');