/** * [get_html description] * @param [type] $order_sn [description] * @param [type] $merchant_info [description] * @return [type] [description] */ public function get_url($appkey, $secretkey, $order) { Paymentwall_Base::setApiType(Paymentwall_Base::API_GOODS); Paymentwall_Base::setAppKey($appkey); // available in your Paymentwall merchant area Paymentwall_Base::setSecretKey($secretkey); // available in your Paymentwall merchant area $currency = $this->pay_order->get_currency_description_ZH_by_id($order['currency']); $currency = $currency[0]->description_ZH; $widget = new Paymentwall_Widget($order['pay_user_id'], 'p1_1', array(new Paymentwall_Product($order['order_sn'], $order['pay_amount'], $currency, 'Game Gold', Paymentwall_Product::TYPE_FIXED)), array()); $url = $widget->getUrl(); $result = array('res' => 1, 'msg' => $url); echo json_encode($result); }
/** * Init Paymentwall */ protected function initPaymentwall($app_key = '', $secret_key = '') { \Paymentwall_Base::setApiType(\Paymentwall_Base::API_GOODS); \Paymentwall_Base::setAppKey($app_key); \Paymentwall_Base::setSecretKey($secret_key); }
/** * @Given /^API type "([^"]*)"$/ */ public function apiType($apiType) { Paymentwall_Base::setApiType($apiType); $this->apiType = $apiType; }