public function testHostedOrderForm() { $expectedForm = file_get_contents(realpath(dirname(__FILE__)) . '/../../resources/hostedOrderForm.txt'); OpenPayU_Configuration::setHashAlgorithm('MD5'); $form = OpenPayU_Order::hostedOrderForm($this->_order); $this->assertEquals($expectedForm, $form); }
public function testHostedOrderForm() { $expectedForm = file_get_contents(realpath(dirname(__FILE__)) . '/../../resources/hostedOrderForm.txt'); $this->assertEquals($expectedForm, OpenPayU_Order::hostedOrderForm($this->_order)); }
$order['merchantPosId'] = OpenPayU_Configuration::getMerchantPosId(); $order['description'] = 'New order'; $order['currencyCode'] = 'PLN'; $order['totalAmount'] = 3200; $order['extOrderId'] = uniqid('', true); $order['products'][0]['name'] = 'Product1'; $order['products'][0]['unitPrice'] = 1000; $order['products'][0]['quantity'] = 1; $order['products'][1]['name'] = 'Product2'; $order['products'][1]['unitPrice'] = 2200; $order['products'][1]['quantity'] = 1; $order['buyer']['email'] = '*****@*****.**'; $order['buyer']['phone'] = '123123123'; $order['buyer']['firstName'] = 'Jan'; $order['buyer']['lastName'] = 'Kowalski'; $rsp = OpenPayU_Order::hostedOrderForm($order); ?> <!doctype html> <html lang="en-US"> <head> <meta charset="UTF-8"> <title>Generated Order Form - OpenPayU v2</title> <link rel="stylesheet" href="../../layout/css/bootstrap.min.css"> <link rel="stylesheet" href="../../layout/css/style.css"> <style type="text/css"> #payu-payment-form button[type=submit]{ border: 0px; height: 50px; width: 290px; background: url('http://static.payu.com/pl/standard/partners/buttons/payu_account_button_long_03.png') no-repeat; cursor: pointer;