
phpCOIN Main Site · Forum Guidelines |
![]() ![]() ![]() ![]() |
Other phpCOIN Sites: [Live Demo] [Downloads] [Docs] [Bugs] [Wall of Shame] |
Welcome Guest ( Log In | Register ) | Resend Validation Email |
Pages: (6) 1 2 [3] 4 5 ... Last » ( Go to first unread post ) | ![]() ![]() ![]() |
nimasdj |
Posted: August 06, 2009 01:07 pm
|
||
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 510 Member No.: 6 Joined: August 26, 2006 ![]() |
Now the answer is easy to mike-sol: You cannot use "API Output Enable: Trans Created" for JAM because ord_xxx and invoice_id is not available within this function which are required for JAM code. Move back your JAM code within "API Output Enable: Order Out Proc" function and use this one. -------------------- :: My Contributions to phpCOIN:
:: Geographic whois :: JAM Integration If you need help/assistance for phpCOIN and/or addon modules installation. Please read here. Affiliate marketing is the best way to attract clients for your hosting. Why not starting an Affiliate Program with your phpCOIN? please read here. |
||
nimasdj |
Posted: August 06, 2009 01:12 pm
|
||||||
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 510 Member No.: 6 Joined: August 26, 2006 ![]() |
Add this within that function and when you set an invoice as paid (whenever Trans Credted api should be called), you should see some information, copy/paste them here that I look at it.
However with what cantex said, I am almost you sure you cannot use that function for JAM. -------------------- :: My Contributions to phpCOIN:
:: Geographic whois :: JAM Integration If you need help/assistance for phpCOIN and/or addon modules installation. Please read here. Affiliate marketing is the best way to attract clients for your hosting. Why not starting an Affiliate Program with your phpCOIN? please read here. |
||||||
mike-sol |
Posted: August 06, 2009 01:26 pm
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 126 Member No.: 3,910 Joined: July 22, 2009 ![]() |
Well I put that code here:
$_APIO_Ret['dn'] = 1; $_APIO_Ret['msg'] = 'none'; print("<pre>"); print_r($_APIO_AData); print("</pre>"); # Return output and it gave the following: Array ( [mod] => orders [stage] => 4 [cor_flag] => 0 [ord_accept_tos] => 1 [ord_accept_aup] => 1 [b_continue] => Continue [op] => [o] => [id] => 0 [cp] => [mode] => order [cl_id] => 1 [ord_cl_id] => 1 [ord_user_name_orig] => 111111 [numrows] => 1 [os_s_id] => 6f9bbb4351106d4a5ccbfb49bb617098 [os_s_time_init] => 1249553994 [os_s_time_last] => 1249554032 [os_s_ip] => 85.243.127.151 [ord_processed] => 0 [ord_ret_processed] => 0 [ord_id] => 97 [ord_ts] => [ord_ip] => 85.243.127.151 [ord_status] => [ord_company] => Top secret [ord_name_first] => micky [ord_name_last] => mouse [ord_addr_01] => disney land [ord_addr_02] => Top secret [ord_city] => Top secret [ord_state_prov] => Top secret [ord_country] => Top secret [ord_zip_code] => Top secret [ord_phone] => Top secret [ord_email] => Top secret [ord_domain] => [ord_domain_action] => 0 [ord_user_name] => Top secret [ord_user_pword] => Top secret [ord_vendor_id] => 3 [ord_prod_id] => 1 [ord_unit_cost] => 10 [ord_referred_by] => [ord_comments] => [ord_optfld_01] => [ord_optfld_02] => [ord_optfld_03] => [ord_optfld_04] => [ord_optfld_05] => [ord_cbflag] => 0 [ord_cbpaid] => 0 [cor_type] => [cor_opt_bill_cycle] => [cor_opt_payment] => [cor_disk] => 0 [cor_disk_units] => Mb [cor_traffic] => 0 [cor_traffic_units] => Gb [cor_dbs] => 0 [cor_mailboxes] => 0 [cor_unique_ip] => 0 [cor_shop_cart] => 0 [cor_sec_cert] => 0 [cor_site_pages] => 0 [cor_comments] => [cor_optfld_01] => [cor_optfld_02] => [cor_optfld_03] => [cor_optfld_04] => [cor_optfld_05] => [prod_id] => 1 [prod_name] => ID-0001 [prod_desc] => Top secret [prod_unit_cost] => 10 [prod_cost] => 10 [prod_apply_tax_01] => 1 [prod_apply_tax_02] => 0 [prod_calc_tax_02_pb] => 0 [prod_dom_type] => 1 [prod_allow_domains] => 0 [prod_allow_subdomains] => 0 [prod_allow_disk_space_mb] => 0 [prod_allow_traffic_mb] => 0 [prod_allow_mailboxes] => 0 [prod_allow_databases] => 0 [invc_id] => 98 ) |
mike-sol |
Posted: August 06, 2009 03:00 pm
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 126 Member No.: 3,910 Joined: July 22, 2009 ![]() |
I posted the info you asked for but it has not yet passed the board moderator.
Since then I realized that I did not complete the payment from within admin so here it is: Array ( [mod] => invoices [mode] => add [obj] => trans [it_ts_year] => 2009 [it_ts_month] => 08 [it_ts_day] => 06 [it_type] => 2 [it_origin] => 1 [it_desc] => [it_amount] => 12.00 [it_set_paid] => 1 [stage] => 2 [it_id] => 177 [it_invc_id] => 98 [b_edit] => Add [op] => [o] => [id] => 0 [cp] => [invc_ts] => [invc_ts_due] => [invc_ts_paid] => [it_ts] => 1249534800 ) Hope this help to see if this is possible Thanks Mike |
nimasdj |
Posted: August 06, 2009 03:21 pm
|
||
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 510 Member No.: 6 Joined: August 26, 2006 ![]() |
Assuming [it_amount] shows the invoice amount and [it_set_paid] = 1 shows the invoices status as paid and [it_invc_id] shows the invoice id number. Then you could use below within Trans Created function. order id cannot be used in JAM transaction id any more.
Cantex, please correct me if I am wrong about [it_amount] and [it_set_paid] and [it_invc_id] above? and what does [it_id] refer too? -------------------- :: My Contributions to phpCOIN:
:: Geographic whois :: JAM Integration If you need help/assistance for phpCOIN and/or addon modules installation. Please read here. Affiliate marketing is the best way to attract clients for your hosting. Why not starting an Affiliate Program with your phpCOIN? please read here. |
||
nimasdj |
Posted: August 06, 2009 04:11 pm
|
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 510 Member No.: 6 Joined: August 26, 2006 ![]() |
sorry, you posted two arrays. which one is from Trans Created?
-------------------- :: My Contributions to phpCOIN:
:: Geographic whois :: JAM Integration If you need help/assistance for phpCOIN and/or addon modules installation. Please read here. Affiliate marketing is the best way to attract clients for your hosting. Why not starting an Affiliate Program with your phpCOIN? please read here. |
mike-sol |
Posted: August 06, 2009 04:20 pm
|
||
Advanced Member ![]() ![]() ![]() Group: Members Posts: 126 Member No.: 3,910 Joined: July 22, 2009 ![]() |
Thank for the reply. Ok [it_amount]=12 yes this is the invoice amount [it_set_paid] =1 I assume this means paid, I don't know for sure. [it_invc_id]=101 yes this is the invoice number This is my api.php
And these are the results - NO commission in jam. [/CODE]Array ( [mod] => orders [stage] => 4 [cor_flag] => 0 [ord_accept_tos] => 1 [ord_accept_aup] => 1 [b_continue] => Continue [op] => [o] => [id] => 0 [cp] => [mode] => order [cl_id] => 1 [ord_cl_id] => 1 [ord_user_name_orig] => 111111 [numrows] => 1 [os_s_id] => ad890f329b847e100ee0cc818843c5bb [os_s_time_init] => 1249564168 [os_s_time_last] => 1249564220 [os_s_ip] => 85.243.127.151 [ord_processed] => 0 [ord_ret_processed] => 0 [ord_id] => 100 [ord_ts] => [ord_ip] => 85.243.127.151 [ord_status] => [ord_company] => removed [ord_name_first] => removed [ord_name_last] => removed [ord_addr_01] => removed [ord_addr_02] => removed [ord_city] => removed [ord_state_prov] => removed [ord_country] => removed [ord_zip_code] => removed [ord_phone] => removed [ord_email] => removed [ord_domain] => [ord_domain_action] => 0 [ord_user_name] => removed [ord_user_pword] => removed [ord_vendor_id] => 3 [ord_prod_id] => 1 [ord_unit_cost] => 10 [ord_referred_by] => [ord_comments] => [ord_optfld_01] => [ord_optfld_02] => [ord_optfld_03] => [ord_optfld_04] => [ord_optfld_05] => [ord_cbflag] => 0 [ord_cbpaid] => 0 [cor_type] => [cor_opt_bill_cycle] => [cor_opt_payment] => [cor_disk] => 0 [cor_disk_units] => Mb [cor_traffic] => 0 [cor_traffic_units] => Gb [cor_dbs] => 0 [cor_mailboxes] => 0 [cor_unique_ip] => 0 [cor_shop_cart] => 0 [cor_sec_cert] => 0 [cor_site_pages] => 0 [cor_comments] => [cor_optfld_01] => [cor_optfld_02] => [cor_optfld_03] => [cor_optfld_04] => [cor_optfld_05] => [prod_id] => 1 [prod_name] => ID-0001 [prod_desc] => removed [prod_unit_cost] => 10 [prod_cost] => 10 [prod_apply_tax_01] => 1 [prod_apply_tax_02] => 0 [prod_calc_tax_02_pb] => 0 [prod_dom_type] => 1 [prod_allow_domains] => 0 [prod_allow_subdomains] => 0 [prod_allow_disk_space_mb] => 0 [prod_allow_traffic_mb] => 0 [prod_allow_mailboxes] => 0 [prod_allow_databases] => 0 [invc_id] => 101 ) After admin made the payment which also sets the invoice as paid and zeros the account. Array ( [mod] => invoices [mode] => add [obj] => trans [it_ts_year] => 2009 [it_ts_month] => 08 [it_ts_day] => 06 [it_type] => 2 [it_origin] => 1 [it_desc] => [it_amount] => 12.00 [it_set_paid] => 1 [it_email_ack] => 1 [stage] => 2 [it_id] => 183 [it_invc_id] => 101 [b_edit] => Add [op] => [o] => [id] => 0 [cp] => [invc_ts] => [invc_ts_due] => [invc_ts_paid] => [it_ts] => 1249534800 )[CODE] No commission in JAM :-( ?? Thanks |
||
cantex |
Posted: August 06, 2009 04:21 pm
|
![]() Chief Cook & Bottle Washer ![]() ![]() ![]() Group: Archive Posts: 3,252 Member No.: 1 Joined: August 25, 2006 ![]() |
it_xxxxx means InvoiceTransaction_xxxxxx
SO..... it_id -> IT record ID it_amount -> IT amount (invoice amount/payment amount/etc.) it_invc_id -> record ID of invoice that this transaction applies to, whether transaction is an invoice or a payment. it_set_paid -> this is NOT a database field. It is flag that is ONLY set IF you click the "Set invoice to paid" checkbox when manually adding/editing a payment. Checking [it_set_paid] to see if the "SET AS PAID" flag was set is not a good idea. What if admin did not click the checkbox? What if it is a partial payment? Instead, check [it_type] which will be: 0 -> This transaction is a new/edited Invoice 1 -> This transaction is a new/edited Credit Memo or other bill reduction 2 -> This transaction is an actual payment via cash/paypal/etc. So, if [it_type] == 2 then give a commission based on the payment amount [it_amount] applied to the invoice [it_invc_id] -------------------- ================================================================
Please do not email or PM me with a question: 1: I handle over a thousand emails a day, so chances are yours would be buried in the pile. 2: All questions will only be answered in the support forums, so the answers will be useful to others. Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :) If you are trying to integrate posted sample code into your website, please take into account any changes in phpCOIN made after the code sample was posted. It is discouraging to spend hours answering questions or trying to track down an issue only to find that the user has a version of phpCOIN that makes the sample irrelevant |
mike-sol |
Posted: August 06, 2009 04:22 pm
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 126 Member No.: 3,910 Joined: July 22, 2009 ![]() |
i just posted another attempt but noshowing yet! Moderator??
|
lightman |
Posted: August 06, 2009 05:06 pm
|
![]() The Janitor ![]() ![]() ![]() Group: Admin Posts: 3,641 Member No.: 3 Joined: August 25, 2006 ![]() |
Sorry, but I do have other work to do other than just monitoring this forum 24/7
![]() -------------------- ***** Unless otherwise stated, all replies refer to the following *****
==================================================================== --- The latest unmodified version of phpCOIN available from the phpCOIN download page on the date and time of this post. --- All relevant HotFix files applied - One of the four included unmodified themes - The original language files . --- Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :) |
nimasdj |
Posted: August 06, 2009 05:51 pm
|
||||
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 510 Member No.: 6 Joined: August 26, 2006 ![]() |
@mike-sol I'd prefer to use "Order Ret Proc" as no invoice id nor order id is available in "Trans Created" api function. If you still insist to use "Trans Created" then replace
with:
-------------------- :: My Contributions to phpCOIN:
:: Geographic whois :: JAM Integration If you need help/assistance for phpCOIN and/or addon modules installation. Please read here. Affiliate marketing is the best way to attract clients for your hosting. Why not starting an Affiliate Program with your phpCOIN? please read here. |
||||
nimasdj |
Posted: August 06, 2009 05:59 pm
|
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 510 Member No.: 6 Joined: August 26, 2006 ![]() |
sorry I meant to say as no order id is available to set as jam transaction id as you desired. if you go use invoice id as jam transaction id, then you'd be fine with the change I said in previous post.
-------------------- :: My Contributions to phpCOIN:
:: Geographic whois :: JAM Integration If you need help/assistance for phpCOIN and/or addon modules installation. Please read here. Affiliate marketing is the best way to attract clients for your hosting. Why not starting an Affiliate Program with your phpCOIN? please read here. |
mike-sol |
Posted: August 06, 2009 06:09 pm
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 126 Member No.: 3,910 Joined: July 22, 2009 ![]() |
I have totally lost the plot now and getting really tired.
This is what I have in my api.php if ($_APIO_AData['it_type'] == '2') { $JAMIntegrate = file_get_contents("http://www.removed.com/affiliates/sale.php?amount=".$_APIO_AData['it_amount']."&trans_id=".$_APIO_AData['it_invc_id']."&custom_mid=".$_COOKIE['jrox'].""); } It did not work I tried as soon as cantex posted. Maybe there is something wrong in that code? Would appreciate it if you could correct it. Thanks Mike |
nimasdj |
Posted: August 07, 2009 02:33 am
|
![]() Advanced Member ![]() ![]() ![]() Group: Members Posts: 510 Member No.: 6 Joined: August 26, 2006 ![]() |
It is correct if this is in "Trans Created" function and it is not working on payment time, then may be your cookie is expired or deleted, make sure you have a new and unique cookie for a new test order. If it is still not working, then it seems Trans Created is not working for JAM and you should use Order Ret Proc function.
-------------------- :: My Contributions to phpCOIN:
:: Geographic whois :: JAM Integration If you need help/assistance for phpCOIN and/or addon modules installation. Please read here. Affiliate marketing is the best way to attract clients for your hosting. Why not starting an Affiliate Program with your phpCOIN? please read here. |
mike-sol |
Posted: August 07, 2009 04:52 am
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 126 Member No.: 3,910 Joined: July 22, 2009 ![]() |
Well it would have been cool to have had the commissions go through on admin payment bank transfer but it just is not happening so yes back to the paylink confirm button.
If you figure it out for JAM please let me know on here. Thanks for your help. Mike |
![]() |
![]() ![]() ![]() |