diff --git a/Examples/example_basic.php b/Examples/example_basic.php index 653d58b..30a6737 100644 --- a/Examples/example_basic.php +++ b/Examples/example_basic.php @@ -44,8 +44,8 @@ // Your code here to handle a successful cryptocoin payment/captcha verification // For example, give user 24 hour access to your member pages - // Please use also IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") for update db records, etc - // ... + + } else $message .= "The payment has not been made yet"; @@ -73,98 +73,14 @@ - - /* - * IPN - User Instant Payment Notification Function - * function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - * - * This user-defined function called every time when a new payment from any user is received successfully. - * For example, send confirmation email, update user membership, etc. - * - * The function will automatically appear for each new payment usually two times : - * a) when a new payment is received, with values: $box_status = cryptobox_newrecord, $payment_details[confirmed] = 0 - * b) and a second time when existing payment is confirmed (6+ confirmations) with values: $box_status = cryptobox_updated, $payment_details[confirmed] = 1. - * - * But sometimes if the payment notification is delayed for 20-30min, the payment/transaction will already be confirmed and the function will - * appear once with values: $box_status = cryptobox_newrecord, $payment_details[confirmed] = 1 - * - * If payment received with correct amount, function receive: $payment_details[status] = 'payment_received' and $payment_details[user] = 11, 12, etc (user_id who has made payment) - * If incorrectly paid amount, the system can not recognize user; function receive: $payment_details[status] = 'payment_received_unrecognised' and $payment_details[user] = '' - * - * Read more - https://gourl.io/api-php.html - * - * Function gets $paymentID from your table crypto_payments, - * $box_status = 'cryptobox_newrecord' OR 'cryptobox_updated' (description above) - * - * and payment details as array - - * - * 1. EXAMPLE - CORRECT PAYMENT - - * $payment_details = array( - * "status": "payment_received", - * "err": "", - * "private_key": "ZnlH0aD8z3YIkhwOKHjK9GmZl", - * "box": "7", - * "boxtype": "paymentbox", - * "order": "91f7c3edc0f86b5953cf1037796a2439", - * "user": "115", - * "usercountry": "USA", - * "amount": "1097.03916195", - * "amountusd": "0.2", - * "coinlabel": "DOGE", - * "coinname": "dogecoin", - * "addr": "DBJBibi39M2Zzyk51dJd5EHqdKbDxR11BH", - * "tx": "309621c28ced8ba348579b152a0dbcfdc90586818e16e526c2590c35f8ac2e08", - * "confirmed": 0, - * "timestamp": "1420215494", - * "date": "02 January 2015", - * "datetime": "2015-01-02 16:18:14" - * ); - * - * 2. EXAMPLE - INCORRECT PAYMENT/WRONG AMOUNT - - * $payment_details = array( - * "status": "payment_received_unrecognised", - * "err": "An incorrect dogecoin amount has been received", - * "private_key": "ZnlH0aD8z3YIkhwOKHjK9GmZl", - * "box": "7", - * "boxtype": "paymentbox", - * "order": "", - * "user": "", - * "usercountry": "", - * "amount": "12", - * "amountusd": "0.002184", - * "coinlabel": "DOGE", - * "coinname": "dogecoin", - * "addr": "DBJBibi39M2Zzyk51dJd5EHqdKbDxR11BH", - * "tx": "96dadd51287bb7dea904607f7076e8ce121c8428106dd57b403000b0d0a11c6f", - * "confirmed": 0, - * "timestamp": "1420215388", - * "date": "02 January 2015", - * "datetime": "2015-01-02 16:16:28" - * ); - */ + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - // .... .... - - return true; - } - - - ?> diff --git a/Examples/pay-per-download-multi.php b/Examples/pay-per-download-multi.php index 97369b8..5f3ab80 100644 --- a/Examples/pay-per-download-multi.php +++ b/Examples/pay-per-download-multi.php @@ -133,26 +133,12 @@ + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... - - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - - // .... .... - - return true; - } diff --git a/Examples/pay-per-download.php b/Examples/pay-per-download.php index 20620f4..7233f43 100644 --- a/Examples/pay-per-download.php +++ b/Examples/pay-per-download.php @@ -96,25 +96,11 @@ - - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - - // .... .... - - return true; - } + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... diff --git a/Examples/pay-per-membership-multi.php b/Examples/pay-per-membership-multi.php index bb350b0..e6a1b3f 100644 --- a/Examples/pay-per-membership-multi.php +++ b/Examples/pay-per-membership-multi.php @@ -92,7 +92,6 @@ // Successful Cryptocoin Payment received - // Please use also IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") for update db records, etc if ($box->is_paid()) { // one time action @@ -117,25 +116,11 @@ - - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - - // .... .... - - return true; - } + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... diff --git a/Examples/pay-per-membership.php b/Examples/pay-per-membership.php index 882da48..c0ff2b4 100644 --- a/Examples/pay-per-membership.php +++ b/Examples/pay-per-membership.php @@ -53,7 +53,6 @@ // Successful Cryptocoin Payment received - // Please use also IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") for update db records, etc if ($box->is_paid()) { // one time action @@ -77,25 +76,11 @@ - - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - - // .... .... - - return true; - } + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... diff --git a/Examples/pay-per-page-multi.php b/Examples/pay-per-page-multi.php index fc9c9af..1b3eab8 100644 --- a/Examples/pay-per-page-multi.php +++ b/Examples/pay-per-page-multi.php @@ -99,24 +99,11 @@ - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - - // .... .... - - return true; - } + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... diff --git a/Examples/pay-per-page.php b/Examples/pay-per-page.php index 619927a..d9217e7 100644 --- a/Examples/pay-per-page.php +++ b/Examples/pay-per-page.php @@ -62,24 +62,11 @@ - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - - // .... .... - - return true; - } + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... diff --git a/Examples/pay-per-post-multi.php b/Examples/pay-per-post-multi.php index 636419b..c5a1bb8 100644 --- a/Examples/pay-per-post-multi.php +++ b/Examples/pay-per-post-multi.php @@ -121,8 +121,6 @@ // ... // ... - // Please use also IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") for update db records, etc - // Set Payment Status to Processed $successful = true; $box->set_status_processed(); @@ -141,24 +139,11 @@ - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - - // .... .... - - return true; - } + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... diff --git a/Examples/pay-per-post.php b/Examples/pay-per-post.php index 345094f..a721ef3 100644 --- a/Examples/pay-per-post.php +++ b/Examples/pay-per-post.php @@ -81,8 +81,6 @@ // ... // ... - // Please use also IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") for update db records, etc - // Set Payment Status to Processed $successful = true; $box->set_status_processed(); @@ -101,24 +99,11 @@ - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - - // .... .... - - return true; - } + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... diff --git a/Examples/pay-per-product-multi.php b/Examples/pay-per-product-multi.php index 397bdf0..7e93519 100644 --- a/Examples/pay-per-product-multi.php +++ b/Examples/pay-per-product-multi.php @@ -88,7 +88,6 @@ $coinName = $box->coin_name(); // Successful Cryptocoin Payment received - // Please use also IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") for update db records, etc if ($box->is_paid()) { if (!$box->is_confirmed()) { @@ -128,24 +127,11 @@ - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - - // .... .... - - return true; - } + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... diff --git a/Examples/pay-per-product.php b/Examples/pay-per-product.php index d16faf1..e94c1eb 100644 --- a/Examples/pay-per-product.php +++ b/Examples/pay-per-product.php @@ -54,7 +54,6 @@ $coinName = $box->coin_name(); // Successful Cryptocoin Payment received - // Please use also IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") for update db records, etc if ($box->is_paid()) { if (!$box->is_confirmed()) { @@ -86,25 +85,11 @@ - - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - - // .... .... - - return true; - } + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... diff --git a/Examples/pay-per-registration-multi.php b/Examples/pay-per-registration-multi.php index b7057dc..adff652 100644 --- a/Examples/pay-per-registration-multi.php +++ b/Examples/pay-per-registration-multi.php @@ -142,25 +142,11 @@ - - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - - // .... .... - - return true; - } + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... diff --git a/Examples/pay-per-registration.php b/Examples/pay-per-registration.php index 8ea7726..8a8df61 100644 --- a/Examples/pay-per-registration.php +++ b/Examples/pay-per-registration.php @@ -101,25 +101,11 @@ - - /********************************************************************************************************/ - /** This IPN function is used every time a new payment from any user is received successfully **/ - /** Function receives paymentID - current payment ID (record id in your mysql table crypto_payments), **/ - /** payment details as array and box_status - 'cryptobox_newrecord' OR 'cryptobox_updated'. **/ - /** **/ - /** Move this function to the bottom of the file cryptobox.class.php or create a separate file **/ - /** More info: https://gourl.io/api-php.html#ipn **/ - /********************************************************************************************************/ - function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") - { - // Your php code here to handle a successful cryptocoin payment/captcha verification - // for example, send confirmation email to user - // update user membership, etc - https://gourl.io/api-php.html#ipn - - // .... .... - - return true; - } + // ... + // Also you can use IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") + // for send confirmation email, update database, update user membership, etc. + // You need to modify file - cryptobox.newpayment.php, read more - https://gourl.io/api-php.html#ipn + // ... diff --git a/cryptobox.callback.php b/cryptobox.callback.php index 1e6344c..c3ce4d1 100644 --- a/cryptobox.callback.php +++ b/cryptobox.callback.php @@ -1,14 +1,18 @@ paymentID, $res, $box_status); @@ -1227,6 +1226,14 @@ function run_sql($sql) "msg_received2" => "%coinName% کپچا %amountPaid% %coinLabel% را با موفقيت دريافت کرد !", "payment" => "روش پرداخت را انتخاب کنيد", "pay_in" => "پرداخت در %coinName%"), + + "ko" => array("name" => "Korean", + "button" => "만약 %coinName% 이미 보냈다면 여기를 클릭하세요", + "msg_not_received" => "%coinNames% 아직 받지 못했습니다.
만약 당신이 이미 %coinNames% 을 보냈다면 (아래 박스안에 보여지는 하나의 결제 내에 여분의 %coinName% 의 합계), 결제 시스템이 진행되는 동안 잠시만 기다려주세요. 만약 당신이 합계에 보여지는 것과 다른 수량의 비트코인을 보냈다면, 결제 시스템은 해당 거래를 무시하며, 당신은 다시 올바른 합계만큼의 비트코인을 보내거나 도움을 줄 수 있는 사이트 관리자에게 연락해야 합니다.", + "msg_received" => "%coinName% 결제 시스템이 %amountPaid% %coinLabel% 를 성공적으로 받았습니다 !", + "msg_received2" => "%coinName% 캡챠가 %amountPaid% %coinLabel% 를 성공적으로 받았습니다 !", + "payment" => "결제 방법 선택", + "pay_in" => "%coinName% 지급"), "ar" => array("name" => "Arabic", "button" => "اضغط هنا في حالة قمت فعلاً بالارسال %coinNames%", diff --git a/cryptobox.config.php b/cryptobox.config.php index 05b91eb..4d5a860 100644 --- a/cryptobox.config.php +++ b/cryptobox.config.php @@ -1,6 +1,10 @@