Пример #1
0
 public function sendTransaction()
 {
     utils\URLDirectory::setBaseURL('https://www.bpoint.com.au/webapi/v2', 'https://www.bpoint.com.au/webapi/v2');
     $transaction = new Transaction();
     $transaction->setAction(constants\Actions::Payment);
     $transaction->setMode(constants\Mode::Live);
     $transaction->setAmount(10000);
     $transaction->setTestMode(true);
     $transaction->setUsername(Yii::$app->params['bpoint']['username']);
     $transaction->setPassword(Yii::$app->params['bpoint']['password']);
     $transaction->setMerchantNumber(Yii::$app->params['bpoint']['merchantNumber']);
     $transaction->setCrn1('1');
     $transaction->setCurrency('AUD');
     $transaction->setType(constants\TransactionType::ECommerce);
     $transaction->setSubType(constants\TransactionSubType::Single);
     $card = new CardDetails();
     $card->setCardHolderName('MasterCard');
     $card->setCardNumber('4987654321098769');
     $card->setCVN('888');
     $card->setExpiryDate('1117');
     $transaction->setCardDetails($card);
     $resp = $transaction->submit();
     print_r($resp);
 }
Пример #2
0
 public function setMode($mode)
 {
     $this->mode = $mode;
     $this->baseUrl = URLDirectory::getBaseURL($this->mode);
 }