public static function createOneTimeBankUsingCredentials($credentials, $attributes = array())
 {
     $conn = new ChargeIO_Connection($credentials);
     $attributes['type'] = 'bank';
     $response = $conn->post('/tokens', $attributes);
     return new ChargeIO_OneTimeToken($response, $conn);
 }
Beispiel #2
0
 public static function createUsingCredentials($credentials, $paymentMethod, $amount, $params = array())
 {
     $conn = new ChargeIO_Connection($credentials);
     $params['amount'] = $amount;
     if ($paymentMethod instanceof ChargeIO_PaymentMethodReference) {
         $params['method'] = $paymentMethod->id;
     } else {
         $params['method'] = $paymentMethod->attributes;
     }
     $response = $conn->post('/credits', $params);
     return new ChargeIO_Credit($response, $conn);
 }
Beispiel #3
0
 public static function findByIdUsingCredentials($credentials, $id)
 {
     $conn = new ChargeIO_Connection($credentials);
     $response = $conn->get('/cards/' . $id);
     return new ChargeIO_Card($response, $conn);
 }
 public static function findByIdUsingCredentials($credentials, $id)
 {
     $conn = new ChargeIO_Connection($credentials);
     $response = $conn->get('/transactions/' . $id);
     return self::parse($response, $conn);
 }
Beispiel #5
0
 public static function allHoldsUsingCredentials($credentials, $params = array())
 {
     $conn = new ChargeIO_Connection($credentials);
     $response = $conn->get('/charges/holds', $params);
     return new ChargeIO_TransactionList($response, $conn);
 }
Beispiel #6
0
 public static function findCurrentUsingCredentials($credentials)
 {
     $conn = new ChargeIO_Connection($credentials);
     $response = $conn->get('/merchant');
     return new ChargeIO_Merchant($response, $conn);
 }