Esempio n. 1
0
 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $action = new Am_Paysystem_Action_Form();
     $action->setUrl('https://www.cashu.com/cgi-bin/pcashu.cgi');
     $action->merchant_id = $this->getConfig('merchant_id');
     $action->amount = $invoice->first_total;
     $action->currency = $invoice->currency;
     $action->language = 'en';
     $action->display_text = $invoice->getLineDescription();
     $action->token = md5(strtolower($action->merchant_id . ":" . sprintf("%.2f", $action->amount) . ":" . $action->currency . ":") . $this->getConfig('secret'));
     $action->txt1 = $invoice->getLineDescription();
     $action->txt2 = $invoice->public_id;
     $action->test_mode = $this->getConfig('testing');
     $result->setAction($action);
 }
Esempio n. 2
0
 public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result)
 {
     $a = new Am_Paysystem_Action_Form();
     $a->setUrl('https://merchant.wmtransfer.com/lmi/payment.asp');
     $a->LMI_PAYEE_PURSE = $this->getConfig('purse');
     $a->LMI_PAYMENT_AMOUNT = $invoice->first_total;
     $a->LMI_PAYMENT_NO = $invoice->invoice_id;
     $a->AMEMBER_ID = $invoice->public_id;
     $a->LMI_PAYMENT_DESC_BASE64 = base64_encode($invoice->getLineDescription());
     //$a->LMI_MODE = $this->getConfig('testing') ? 1 : 0;
     $a->LMI_SIM_MODE = 2;
     $a->LMI_RESULT_URL = $this->getPluginUrl('ipn');
     $a->LMI_SUCCESS_URL = $this->getPluginUrl('thanks');
     $a->LMI_SUCCESS_METHOD = 1;
     // post to thanks
     $a->LMI_FAIL_URL = $this->getCancelUrl();
     $a->LMI_FAIL_METHOD = 1;
     //
     $a->LMI_PAYMER_EMAIL = $invoice->getEmail();
     $result->setAction($a);
 }