コード例 #1
0
    // Javascript "CallServer" funtion
    public void RaiseCallbackEvent(String eventArgument)
    {
        // Set amount and email
        JSONObject json   = JSONObject.CreateFromString(eventArgument);
        Int16      amount = Convert.ToInt16(json.Dictionary["amount"].ToString());
        string     email  = json.Dictionary["email"].ToString();

        // Create checkout preference
        Preference preference = CreatePreference(amount, email);

        // Return checkout init point
        returnValue = preference.InitPoint;
    }