当前位置: 首页>>代码示例>>PHP>>正文


PHP coupon::CreateCard方法代码示例

本文整理汇总了PHP中coupon::CreateCard方法的典型用法代码示例。如果您正苦于以下问题:PHP coupon::CreateCard方法的具体用法?PHP coupon::CreateCard怎么用?PHP coupon::CreateCard使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在coupon的用法示例。


在下文中一共展示了coupon::CreateCard方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: explode

     }
     $arr = explode('=', $da);
     $post[$arr[0]] = trim($arr[1]);
 }
 $out['errno'] = 1;
 $out['error'] = '';
 $post['logo_url'] = empty($post['logo_url']) ? $setting['logourl'] : trim($post['logo_url']);
 $base = new Card('GENERAL_COUPON', $post);
 if (is_error($base->general_coupon->base_info)) {
     $out['errno'] = 0;
     $out['error'] = $base->general_coupon->base_info['message'];
     exit(json_encode($out));
 }
 $base->get_card()->set_default_detail(urlencode(trim($post['default_detail'])));
 $acc = new coupon($acid);
 $status = $acc->CreateCard($base->toJson());
 if (is_error($status)) {
     $out['errno'] = 0;
     $out['error'] = $status['message'];
     exit(json_encode($out));
 }
 $post['card_id'] = $status['card_id'];
 $post['date_info'] = array('time_type' => $post['time_type'], 'time_limit_start' => $post['time_limit[start]'], 'time_limit_end' => $post['time_limit[end]'], 'deadline' => $post['deadline'], 'limit' => $post['limit']);
 $post['date_info'] = iserializer($post['date_info']);
 if (!empty($post['location-select'])) {
     $location = explode('-', $post['location-select']);
     $post['location_id_list'] = iserializer($location);
 } else {
     $post['location_id_list'] = iserializer(array());
 }
 $post['uniacid'] = $_W['uniacid'];
开发者ID:6662680,项目名称:qday_wx,代码行数:31,代码来源:card.ctrl.php

示例2: exit

<?php

/**
 * [WEIZAN System] Copyright (c) 2015 012WZ.COM
 * WeiZan is NOT a free software, it under the license terms, visited http://www.012wz.com/ for more details.
 */
defined('IN_IA') or exit('Access Denied');
$dos = array('module', 'coupon', 'location', 'discount', 'display', 'del', 'sync', 'modifystock', 'toggle', 'qr', 'record', 'cash', 'gift', 'groupon', 'general_coupon');
$do = in_array($do, $dos) ? $do : 'post';
$op = trim($_GPC['op']) ? trim($_GPC['op']) : 'post';
$acid = intval($_W['acid']);
load()->classs('coupon');
if ($do == 'post') {
    $data = array('card' => array('card_type' => 'MEMBER_CARD', 'member_card' => array('base_info' => array('logo_url' => urlencode('http://mmbiz.qpic.cn/mmbiz/qYicJhgpqsd37NCqJIqia4KF9o4fmq7NTgnQMd5vBSwn2ibBRQ4wCLr47ohUI6xicWUc7ibxoyJDubnNs3mxnfSXy2g/0'), 'brand_name' => urlencode('商家信息'), 'color' => 'Color080', 'title' => urlencode('折扣券标题'), 'sub_title' => urlencode('折扣券标题'), 'can_share' => true, 'can_give_friend' => true, 'code_type' => 'CODE_TYPE_TEXT', 'notice' => urlencode('操作提示操作提示'), 'description' => urlencode('使用须知使用须知'), 'service_phone' => urlencode('1000000'), 'get_limit' => 100, 'date_info' => array('type' => 'DATE_TYPE_FIX_TIME_RANGE', 'begin_timestamp' => '1439136000', 'end_timestamp' => '1444838400'), 'sku' => array('quantity' => 10000), 'custom_url_name' => urlencode('立即使用'), 'custom_url' => urlencode('http://bbs.012wz.com'), 'custom_url_sub_title' => urlencode('6个汉字tips'), 'promotion_url_name' => urlencode('营销入口1'), 'promotion_url' => urlencode('http://www.012wz.com')), 'supply_bonus' => true, 'supply_balance' => false, 'prerogative' => urlencode('会员卡特权说明'), 'custom_field1' => array('name_type' => 'FIELD_NAME_TYPE_LEVEL', 'url' => urlencode('http://www.012wz.com')), 'activate_url' => urlencode('http://bbs.012wz.com'), 'custom_cell1' => array('name' => urlencode('使用入口2'), 'tips' => urlencode('激活后显示'), 'url' => urlencode('http://bbs.012wz.com')))));
    $acc = new coupon($acid);
    $status = $acc->CreateCard(urldecode(json_encode($data)));
    print_r($status);
}
if ($do == 'update') {
    $data = array('init_bonus' => 100, 'init_balance' => 200, 'membership_number' => 12345678, 'code' => '', 'card_id' => 'pTKzFjtDm_SKwh2vbiLwD2cGO0Ik ', 'custom_field_value1' => '白金会员组');
}
开发者ID:aspnmy,项目名称:weizan,代码行数:21,代码来源:member.ctrl.php


注:本文中的coupon::CreateCard方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。