function run_transaction($vars) { $bp = new BluePayment($this->config[account_id], $this->config[secret], $this->config[test] ? "TEST" : LIVE); $bp->sale($vars[amount]); $bp->payType = 'CREDIT'; $bp->setCustInfo($vars[cc], $vars[cvv2], $vars[expire], $vars[name1], $vars[name2], $vars[street], $vars[city], $vars[state], $vars[zip], $vars[country]); $bp->process(); $res = array('STATUS' => $bp->getStatus(), 'AVS' => $bp->getAvsResp(), 'PNREF' => $bp->getTransId(), 'CVV_VALID' => $bp->getCvv2Resp(), 'AUTH_CODE' => $bp->getAuthCode(), 'RESPMSG' => $bp->getMessage()); return $res; }
public function blueTransaction($param) { $bp = new BluePayment(); $bp->sale('25.00'); $bp->setCustInfo('4111111111111111', '123', '1111', 'Chris', 'Jansen', '123 Bluepay Ln', 'Bluesville', 'IL', '60563', 'USA', '123-456-7890', '*****@*****.**'); $bp->process(); $output = $bp->getresponse(); //echo 'Response: '. $bp->getResponse() .'<br />'. // 'TransId: '. $bp->getTransId() .'<br />'. // 'Status: '. $bp->getStatus() .'<br />'. // 'AVS Resp: '. $bp->getAvsResp() .'<br />'. // 'CVV2 Resp: '. $bp->getCvv2Resp() .'<br />'. // 'Auth Code: '. $bp->getAuthCode() .'<br />'. // 'Message: '. $bp->getMessage() .'<br />'. // 'Rebid: '. $bp->getRebid(); $outarray = array('response' => '12or3', 'responsetext' => $bp->getResponse(), 'authcode' => $bp->getAuthCode(), 'transactionid' => $bp->getTransId(), 'avsresponse' => $bp->getAvsResp(), 'cvvresponse' => $bp->getCvv2Resp(), 'orderid' => $bp->getMessage(), 'response_code' => $bp->getResponse()); $response = array_merge_recursive($outarray, $charged); return $response; }
function rebAdd($amount, $date, $expr, $cycles) { $this->doRebill = '1'; $this->rebAmount = BluePayment::formatAmount($amount); $this->rebDate = $date; $this->rebExpr = $expr; $this->rebCycles = $cycles; }