latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Home Forums James

About: James

Sorry, I've not written a description yet. I'll get to it soon!


Topics I've Started

Viewing topic 1 (of 1 total)
Topic Count Last Reply
Member roles are not correct for new gateway

By:  James in: Community Forum

voices: 2
replies: 6

4 years, 3 months ago  Cristián Lávaque

Viewing topic 1 (of 1 total)

My Latest Replies (From Various Topics)

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Thursday Sep 27th, 2012 at 1:50 am #26646
James
Username: jhutto

Thanks for your help, Cristián. I’ve found it was the length of the ‘txn_id’ and ‘subscr_id’ that plays the trick, after I make the y2pay’s ‘txn_id’ match authnet’s, it got working. Thanks again!

Posted: Tuesday Sep 25th, 2012 at 11:35 am #26438
James
Username: jhutto

Hi Cristián, thanks very much for your reply.

I’m using pro-forms, and confirmation email can be received.
And yes there are logs:

1. y2pay-api.log

PHP v5.4.4 :: WordPress® v3.4.2 :: s2Member® v120703 :: s2Member® Pro v120703
Memory 14.16 MB :: Real Memory 14.25 MB :: Peak Memory 14.23 MB :: Real Peak Memory 14.25 MB
localhost/sms/individual-monthly-membership/?s2-ssl=yes
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1
-------- Input vars: (  ) --------
array (
  'x_type' => 'AUTH_CAPTURE',
  'x_method' => 'CC',
  'x_email' => 'asdf@fsd.com',
  'x_first_name' => 'asdf',
  'x_last_name' => 'asdf',
  'x_customer_ip' => '::1',
  'x_invoice_num' => 's2-5061bc3b0f91e',
  'x_description' => '$23.95 USD / One Time ( for 1 month access, non-recurring, no trial )',
  's2_invoice' => '1::1 M',
  's2_custom' => 'localhost',
  'x_tax' => '0.00',
  'x_amount' => '23.95',
  'x_card_num' => '********2352',
  'x_exp_date' => '2015-05',
  'x_card_code' => '4324',
  'x_address' => 'dfas',
  'x_city' => 'asdf',
  'x_state' => 'as',
  'x_country' => 'BS',
  'x_zip' => '43243',
)
-------- Output string/vars: (  ) --------

array (
  'EXTKey' => 'EK21212',
  'Result' => 'Declined',
  'ResultCode' => 'U20',
  'ResultMsg' => 'U20-INVALID CREDIT CARD NUMBER',
  'TranID' => 2155223,
  'BatchID' => 660018,
  'TranDate' => 20120925,
  'ResultAuth' => '',
  'PmtAcctNumMasked' => '542343xx2352',
  'ResultTrace' => '35EA3E53-A211-454A-9FD0-ED809ABD7365',
  'ResultAVS' => '',
  'PlanID' => '0',
  'PlanTranID' => '0',
  'AmountPayment' => 23.95,
  'AmountVoid' => 0,
  'AmountCredit' => 0,
)

The payment was not successful (invalid credit card, just for testing). But I removed the code

&& empty($authnet["__error"])

in “authnet-checkout-in.inc.php”, to make the registration processes even if the payment fails.

2. paypal-ipn.log

PHP v5.4.4 :: WordPress® v3.4.2 :: s2Member® v120703 :: s2Member® Pro v120703
Memory 15.53 MB :: Real Memory 16.25 MB :: Peak Memory 15.55 MB :: Real Peak Memory 16.25 MB
localhost/sms/?s2member_paypal_notify=1&s2member_paypal_proxy=y2pay&s2member_paypal_proxy_use=pro-emails&s2member_paypal_proxy_verification=d780d5f1c3ef4aad12dca83dfb14ba1c&s2member_paypal_proxy_return_url=
User-Agent: WordPress/3.4.2; http://localhost/sms
array (
  'txn_type' => 'web_accept',
  'txn_id' => '2155223',
  'custom' => 'localhost',
  'mc_gross' => '23.95',
  'mc_currency' => 'USD',
  'tax' => '0.00',
  'payer_email' => 'asdf@fsd.com',
  'first_name' => 'asdf',
  'last_name' => 'asdf',
  'option_name1' => 'Originating Domain',
  'option_selection1' => 'localhost',
  'option_name2' => 'Customer IP Address',
  'option_selection2' => '::1',
  'item_name' => '$23.95 USD / One Time ( for 1 month access, non-recurring, no trial )',
  'item_number' => '1::1 M',
  'proxy_verified' => 'y2pay',
  's2member_log' => 
  array (
    0 => 'IPN received on: Tue Sep 25, 2012 9:14:32 am CDT',
    1 => 's2Member POST vars verified with a Proxy Key',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ).',
    4 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ) w/o update vars.',
    5 => 'Signup Confirmation Email sent to: "asdf asdf" <asdf@fsd.com>.',
    6 => 'Storing `payment` for Subscription via ( `web_accept` ).',
    7 => 'Creating an IPN response for `subscr_payment`. This will go into a Transient Queue; and be processed during registration.',
    8 => 'Storing IPN signup vars into a Transient Queue. These will be processed on registration.',
  ),
  'subscr_gateway' => 'y2pay',
  'subscr_id' => '2155223',
  'eotper' => '1 M',
  'ccaps' => '',
  'level' => '1',
  'ip' => '::1',
  'period1' => '0 D',
  'mc_amount1' => '0.00',
  'period3' => '1 M',
  'mc_amount3' => '23.95',
  'initial_term' => '0 D',
  'initial' => '23.95',
  'regular' => '23.95',
  'regular_term' => '1 M',
  'recurring' => '0',
  's2member_paypal_proxy' => 'y2pay',
  's2member_paypal_proxy_use' => 'pro-emails',
  's2member_paypal_proxy_verification' => 'd780d5f1c3ef4aad12dca83dfb14ba1c',
)

I think the IPN log seems ok, it received the ‘txn_id’ and just regarded the payment as it’s successful. The ‘level’ => ‘1’ was correct.

My confusion is that how the Access Level is stored when registration is processed. (I was expecting to not change the codes for registration since the new gateway is directly modified from authnet, but why it’s not working the same as authnet? – well I guess authnet works well)

I’ll appreciate your further help! Have a nice day!

Posted: Tuesday Sep 25th, 2012 at 3:45 am #26403
James
Username: jhutto

I found the following code in s2member-pro\includes\classes\gateways\authnet\authnet-checkout-in.inc.php:

if(((is_multisite() && ($new__user_id = c_ws_plugin__s2member_registrations::ms_create_existing_user($create_user["user_login"], $create_user["user_email"], $create_user["user_pass"]))) || ($new__user_id = wp_create_user($create_user["user_login"], $create_user["user_pass"], $create_user["user_email"]))) && !is_wp_error($new__user_id)){
...
}													

When the site is multisite, it uses ms_create_existing_user() to stimulate the registration; when it’s not, it uses wp_create_user() directly.

In the single-site case, I do not quite understand how the Member Role property’s stored, as wp_create_user() only requires 3 parameters.

Your help will be apreciated!

Viewing 3 replies - 1 through 3 (of 3 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.