<?php

/**
 * IOS 配置信息
 */
class config_for_ios {

    /**
     * @var string 苹果服务器上的Apple ID(言灵世界)
     */
    public $appid = '1315525729';

    /**
     * @var string 与IOS客户端共享的签名秘钥
     */
    public $appkey = 'comloyalsoftylsj';

    /**
     * @var string 支付凭证验证地址
     */
    public $verifySession_url;

    /**
     * @var string 支付凭证验证时的请求方式(get)
     */
    public $verifySession_method;

    /**
     * configs for IOS
     * @return config_for_ios Description
     */
    static function Inst($sandbox = false) {
        $c = new config_for_ios();
        if ($sandbox) {                                                         # 沙箱地址
            $c->verifySession_url = 'https://sandbox.itunes.apple.com/verifyReceipt';
        } else {                                                                # 正式地址
            $c->verifySession_url = 'https://buy.itunes.apple.com/verifyReceipt';
        }
        return $c;
    }

}
