/**
  * Parse and Authenticate the incoming notification from Genesis
  *
  * @param array $notification - Incoming notification ($_POST)
  * @param bool  $authenticate - Set to true if you want to validate the notification
  *
  * @throws \Genesis\Exceptions\InvalidArgument()
  */
 public function parseNotification($notification = array(), $authenticate = true)
 {
     $notificationWalk = array();
     array_walk($notification, function ($val, $key) use(&$notificationWalk) {
         $key = trim(rawurldecode($key));
         $val = trim(rawurldecode($val));
         $notificationWalk[$key] = $val;
     });
     $notification = $notificationWalk;
     $this->notificationObj = \Genesis\Utils\Common::createArrayObject($notification);
     if ($this->isAPINotification()) {
         $this->unique_id = (string) $this->notificationObj->unique_id;
     }
     if ($this->isWPFNotification()) {
         $this->unique_id = (string) $this->notificationObj->wpf_unique_id;
     }
     if ($authenticate && !$this->isAuthentic()) {
         throw new \Genesis\Exceptions\InvalidArgument('Invalid Genesis Notification!');
     }
 }
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('chargeback_request' => array('arn' => $this->arn, 'original_transaction_unique_id' => $this->original_transaction_unique_id));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }
Esempio n. 3
0
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('wpf_payment' => array('transaction_id' => $this->transaction_id, 'amount' => $this->transform('amount', array($this->amount, $this->currency)), 'currency' => $this->currency, 'usage' => $this->usage, 'description' => $this->description, 'customer_email' => $this->customer_email, 'customer_phone' => $this->customer_phone, 'notification_url' => $this->notification_url, 'return_success_url' => $this->return_success_url, 'return_failure_url' => $this->return_failure_url, 'return_cancel_url' => $this->return_cancel_url, 'billing_address' => array('first_name' => $this->billing_first_name, 'last_name' => $this->billing_last_name, 'address1' => $this->billing_address1, 'address2' => $this->billing_address2, 'zip_code' => $this->billing_zip_code, 'city' => $this->billing_city, 'state' => $this->billing_state, 'country' => $this->billing_country), 'shipping_address' => array('first_name' => $this->shipping_first_name, 'last_name' => $this->shipping_last_name, 'address1' => $this->shipping_address1, 'address2' => $this->shipping_address2, 'zip_code' => $this->shipping_zip_code, 'city' => $this->shipping_city, 'state' => $this->shipping_state, 'country' => $this->shipping_country), 'transaction_types' => $this->transaction_types, 'risk_params' => array('ssn' => $this->risk_ssn, 'mac_address' => $this->risk_mac_address, 'session_id' => $this->risk_session_id, 'user_id' => $this->risk_user_id, 'user_level' => $this->risk_user_level, 'email' => $this->risk_email, 'phone' => $this->risk_phone, 'remote_ip' => $this->risk_remote_ip, 'serial_number' => $this->risk_serial_number)));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }
Esempio n. 4
0
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('retrieval_request_request' => array('start_date' => $this->start_date, 'end_date' => $this->end_date, 'page' => $this->page));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('wpf_reconcile' => array('unique_id' => $this->unique_id));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('payment_transaction' => array('transaction_type' => \Genesis\API\Constants\Transaction\Types::INIT_RECURRING_SALE, 'transaction_id' => $this->transaction_id, 'usage' => $this->usage, 'gaming' => $this->gaming, 'moto' => $this->moto, 'remote_ip' => $this->remote_ip, 'amount' => $this->transform('amount', array($this->amount, $this->currency)), 'currency' => $this->currency, 'card_holder' => $this->card_holder, 'card_number' => $this->card_number, 'cvv' => $this->cvv, 'expiration_month' => $this->expiration_month, 'expiration_year' => $this->expiration_year, 'customer_email' => $this->customer_email, 'customer_phone' => $this->customer_phone, 'birth_date' => $this->birth_date, 'billing_address' => array('first_name' => $this->billing_first_name, 'last_name' => $this->billing_last_name, 'address1' => $this->billing_address1, 'address2' => $this->billing_address2, 'zip_code' => $this->billing_zip_code, 'city' => $this->billing_city, 'state' => $this->billing_state, 'country' => $this->billing_country), 'shipping_address' => array('first_name' => $this->shipping_first_name, 'last_name' => $this->shipping_last_name, 'address1' => $this->shipping_address1, 'address2' => $this->shipping_address2, 'zip_code' => $this->shipping_zip_code, 'city' => $this->shipping_city, 'state' => $this->shipping_state, 'country' => $this->shipping_country), 'risk_params' => array('ssn' => $this->risk_ssn, 'mac_address' => $this->risk_mac_address, 'session_id' => $this->risk_session_id, 'user_id' => $this->risk_user_id, 'user_level' => $this->risk_user_level, 'email' => $this->risk_email, 'phone' => $this->risk_phone, 'remote_ip' => $this->risk_remote_ip, 'serial_number' => $this->risk_serial_number), 'dynamic_descriptor_params' => array('merchant_name' => $this->dynamic_merchant_name, 'merchant_city' => $this->dynamic_merchant_city)));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }
Esempio n. 7
0
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('payment_transaction' => array('transaction_type' => \Genesis\API\Constants\Transaction\Types::PAYBYVOUCHER_YEEPAY, 'transaction_id' => $this->transaction_id, 'card_type' => $this->card_type, 'redeem_type' => $this->redeem_type, 'remote_ip' => $this->remote_ip, 'amount' => $this->transform('amount', array($this->amount, $this->currency)), 'currency' => $this->currency, 'product_name' => $this->product_name, 'product_category' => $this->product_category, 'customer_name' => $this->customer_name, 'customer_email' => $this->customer_email, 'customer_phone' => $this->customer_phone, 'customer_id_number' => $this->customer_id_number, 'customer_bank_id' => $this->customer_bank_id, 'bank_account_number' => $this->bank_account_number));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('payment_transaction' => array('transaction_type' => \Genesis\API\Constants\Transaction\Types::ACCOUNT_VERIFICATION, 'transaction_id' => $this->transaction_id, 'usage' => $this->usage, 'moto' => $this->moto, 'remote_ip' => $this->remote_ip, 'card_holder' => $this->card_holder, 'card_number' => $this->card_number, 'cvv' => $this->cvv, 'expiration_month' => $this->expiration_month, 'expiration_year' => $this->expiration_year, 'customer_email' => $this->customer_email, 'customer_phone' => $this->customer_phone, 'billing_address' => array('first_name' => $this->billing_first_name, 'last_name' => $this->billing_last_name, 'address1' => $this->billing_address1, 'address2' => $this->billing_address2, 'zip_code' => $this->billing_zip_code, 'city' => $this->billing_city, 'state' => $this->billing_state, 'country' => $this->billing_country), 'shipping_address' => array('first_name' => $this->shipping_first_name, 'last_name' => $this->shipping_last_name, 'address1' => $this->shipping_address1, 'address2' => $this->shipping_address2, 'zip_code' => $this->shipping_zip_code, 'city' => $this->shipping_city, 'state' => $this->shipping_state, 'country' => $this->shipping_country), 'risk_params' => array('ssn' => $this->risk_ssn, 'mac_address' => $this->risk_mac_address, 'session_id' => $this->risk_session_id, 'user_id' => $this->risk_user_id, 'user_level' => $this->risk_user_level, 'email' => $this->risk_email, 'phone' => $this->risk_phone, 'remote_ip' => $this->risk_remote_ip, 'serial_number' => $this->risk_serial_number)));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('payment_transaction' => array('transaction_type' => \Genesis\API\Constants\Transaction\Types::CREDIT, 'transaction_id' => $this->transaction_id, 'usage' => $this->usage, 'remote_ip' => $this->remote_ip, 'reference_id' => $this->reference_id, 'amount' => $this->transform('amount', array($this->amount, $this->currency)), 'currency' => $this->currency));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }
Esempio n. 10
0
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('payment_transaction' => array('transaction_type' => \Genesis\API\Constants\Transaction\Types::VOID, 'transaction_id' => $this->transaction_id, 'usage' => $this->usage, 'remote_ip' => $this->remote_ip, 'reference_id' => $this->reference_id));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('blacklist_request' => array('card_number' => $this->card_number, 'terminal_token' => $this->terminal_token));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('payment_transaction' => array('transaction_type' => \Genesis\API\Constants\Transaction\Types::EZEEWALLET, 'transaction_id' => $this->transaction_id, 'usage' => $this->usage, 'remote_ip' => $this->remote_ip, 'amount' => $this->transform('amount', array($this->amount, $this->currency)), 'currency' => $this->currency, 'return_success_url' => $this->return_success_url, 'return_failure_url' => $this->return_failure_url, 'source_wallet_id' => $this->source_wallet_id, 'source_wallet_pwd' => $this->transform('wallet_password', array($this->source_wallet_pwd))));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('payment_transaction' => array('transaction_type' => \Genesis\API\Constants\Transaction\Types::PPRO, 'transaction_id' => $this->transaction_id, 'payment_type' => $this->payment_type, 'usage' => $this->usage, 'remote_ip' => $this->remote_ip, 'amount' => $this->transform('amount', array($this->amount, $this->currency)), 'currency' => $this->currency, 'return_success_url' => $this->return_success_url, 'return_failure_url' => $this->return_failure_url, 'customer_email' => $this->customer_email, 'customer_phone' => $this->customer_phone, 'account_number' => $this->account_number, 'bank_code' => $this->bank_code, 'bic' => $this->bic, 'iban' => $this->iban, 'account_phone' => $this->account_phone, 'billing_address' => array('first_name' => $this->billing_first_name, 'last_name' => $this->billing_last_name, 'address1' => $this->billing_address1, 'address2' => $this->billing_address2, 'zip_code' => $this->billing_zip_code, 'city' => $this->billing_city, 'state' => $this->billing_state, 'country' => $this->billing_country), 'shipping_address' => array('first_name' => $this->shipping_first_name, 'last_name' => $this->shipping_last_name, 'address1' => $this->shipping_address1, 'address2' => $this->shipping_address2, 'zip_code' => $this->shipping_zip_code, 'city' => $this->shipping_city, 'state' => $this->shipping_state, 'country' => $this->shipping_country), 'risk_params' => array('ssn' => $this->risk_ssn, 'mac_address' => $this->risk_mac_address, 'session_id' => $this->risk_session_id, 'user_id' => $this->risk_user_id, 'user_level' => $this->risk_user_level, 'email' => $this->risk_email, 'phone' => $this->risk_phone, 'remote_ip' => $this->risk_remote_ip, 'serial_number' => $this->risk_serial_number)));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }
Esempio n. 14
0
 /**
  * Set the per-request configuration
  *
  * @return void
  */
 protected function initConfiguration()
 {
     $this->config = \Genesis\Utils\Common::createArrayObject(array('protocol' => 'https', 'port' => 443, 'type' => 'GET', 'format' => 'plain'));
     $this->setApiConfig('url', $this->buildRequestURL('gateway', 'retrieve_abn_ideal_banks', false));
 }
 /**
  * Parse and Authenticate the incoming notification from Genesis
  *
  * @param array $notification - Incoming notification ($_POST)
  * @param bool  $authenticate - Set to true if you want to validate the notification
  *
  * @throws \Genesis\Exceptions\InvalidArgument()
  */
 public function parseNotification($notification = array(), $authenticate = true)
 {
     $this->notificationObj = \Genesis\Utils\Common::createArrayObject($notification);
     if (isset($this->notificationObj->unique_id) && !empty($this->notificationObj->unique_id)) {
         $this->isAPINotification = true;
         $this->unique_id = (string) $this->notificationObj->unique_id;
     }
     if (isset($this->notificationObj->wpf_unique_id) && !empty($this->notificationObj->wpf_unique_id)) {
         $this->isWPFNotification = true;
         $this->unique_id = (string) $this->notificationObj->wpf_unique_id;
     }
     if ($authenticate && !$this->isAuthentic()) {
         throw new \Genesis\Exceptions\InvalidArgument('Invalid Genesis Notification!');
     }
 }
 /**
  * Create the request's Tree structure
  *
  * @return void
  */
 protected function populateStructure()
 {
     $treeStructure = array('payment_transaction' => array('transaction_type' => \Genesis\API\Constants\Transaction\Types::PAYOUT, 'transaction_id' => $this->transaction_id, 'usage' => $this->usage, 'amount' => $this->transform('amount', array($this->amount, $this->currency)), 'currency' => $this->currency, 'remote_ip' => $this->remote_ip, 'card_holder' => $this->card_holder, 'card_number' => $this->card_number, 'cvv' => $this->cvv, 'expiration_month' => $this->expiration_month, 'expiration_year' => $this->expiration_year, 'customer_email' => $this->customer_email, 'customer_phone' => $this->customer_phone, 'billing_address' => array('first_name' => $this->billing_first_name, 'last_name' => $this->billing_last_name, 'address1' => $this->billing_address1, 'address2' => $this->billing_address2, 'zip_code' => $this->billing_zip_code, 'city' => $this->billing_city, 'state' => $this->billing_state, 'country' => $this->billing_country), 'shipping_address' => array('first_name' => $this->shipping_first_name, 'last_name' => $this->shipping_last_name, 'address1' => $this->shipping_address1, 'address2' => $this->shipping_address2, 'zip_code' => $this->shipping_zip_code, 'city' => $this->shipping_city, 'state' => $this->shipping_state, 'country' => $this->shipping_country)));
     $this->treeStructure = \Genesis\Utils\Common::createArrayObject($treeStructure);
 }