예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     Zarinpal.StoreInitialized += () =>
     {
         if (DebugText != null)
         {
             DebugText.text = ("Initialize Succeed");
         }
     };
     Zarinpal.StoreInitializeFailed += (s) =>
     {
         if (DebugText != null)
         {
             DebugText.text = (s);
         }
     };
     Zarinpal.Initialize();
     Zarinpal.PurchaseSucceed += (productID, authority) =>
     {
         if (DebugText != null)
         {
             DebugText.text = ($"Product with ID {productID} purchase succeed with authority : {authority} ");
         }
         OnPurchaseDone?.Invoke(productID);
     };
 }
예제 #2
0
    public void Purchase()
    {
        long price;

        long.TryParse(m_amount.text, out price);
        var desc      = m_desc.text;
        var productID = m_productID.text;

        Zarinpal.Purchase(price, desc, productID);
    }
예제 #3
0
 public static void Purchase(int amount, string decs, string id)
 {
     Zarinpal.Purchase(amount, decs, id);
 }
예제 #4
0
 public void Initialize()
 {
     Zarinpal.Initialize();
 }