Shipping Option Name Missing from IPN - paypal

What would cause the shipping option chosen by the customer (along with some related fields) to not be returned in the IPN?
We are using an encrypted 'cart upload' command combined with the Instant Update API to provide dynamic shipping options based on the customer's address (explained here ). In some (not all) cases, the shipping_option_name and some related values are not being returned in the IPN. Additionally, the name of the shipping option selected by the user is not available from the PayPal interface when we view transaction details.
Note that this happens in only some cases, and we cannot find a common cause among the failures.
UPDATE 1/29/14 - We have noticed that the shipping option name is being recorded for ALL transactions in which the Counterparty Status is "Unregistered," and about 25% of the transactions for which the Counterparty Status is something else (e.g., Confirmed, Non-Confirmed, Verified, etc.).
We have set up logging to track outgoing Instant Update data and incoming IPN data. In cases where the shipping_option_name is missing from the IPN, the following fields are also missing:
Shipping_calculation_mode
shipping_option_name
insurance_option_selected
shipping_option_amount
insurance_amount
receipt_id
shipping_is_default
I'm pasting our Instant Update response and the PayPal IPN for two very similar transactions below. Both transactions purchase the same product, have the same shipping price, and the customers live in the same state. The first transaction successfully returned the shipping option name in the IPN and the second transaction did not. Sensitive values have been replaced with XX. Note the Instant Update response is identical between the two transactions, yet some values are missing from the IPN for the second transaction.
First Transaction - Successfully records shipping option name
------------
OUR INSTANT UPDATE RESPONSE
-----------
METHOD=CallbackResponse
&L_SHIPPINGOPTIONLABEL0=Ground
&L_SHIPPINGOPTIONAMOUNT0=16.95
&L_TAXAMT0=0
&L_SHIPPINGOPTIONISDEFAULT0=true
&L_SHIPPINGOPTIONLABEL1=3-Day
&L_SHIPPINGOPTIONAMOUNT1=45
&L_TAXAMT1=0
&L_SHIPPINGOPTIONISDEFAULT1=false
&L_SHIPPINGOPTIONLABEL2=2-Day
&L_SHIPPINGOPTIONAMOUNT2=60
&L_TAXAMT2=0
&L_SHIPPINGOPTIONISDEFAULT2=false
&L_SHIPPINGOPTIONLABEL3=Next Day - Standard (Afternoon)
&L_SHIPPINGOPTIONAMOUNT3=85
&L_TAXAMT3=0
&L_SHIPPINGOPTIONISDEFAULT3=false
&L_SHIPPINGOPTIONLABEL4=Next Day - Priority (Morning)
&L_SHIPPINGOPTIONAMOUNT4=100
&L_TAXAMT4=0
&L_SHIPPINGOPTIONISDEFAULT4=false
------------
IPN DATA FROM PAYPAL
-----------
[p] => store/paypal-checkout-response
[Shipping_calculation_mode] => Callback
[mc_gross] => 132.15
[protection_eligibility] => Eligible
[address_status] => confirmed
[item_number1] => 18827
[payer_id] => XX
[tax] => 0.00
[address_street] => XX
[payment_date] => 09:00:47 Jan 23, 2014 PST
[payment_status] => Completed
[charset] => windows-1252
[shipping_option_name] => Ground
[address_zip] => XX
[mc_shipping] => 16.95
[mc_handling] => 0.00
[first_name] => XX
[mc_fee] => 4.13
[address_country_code] => US
[address_name] => XX
[notify_version] => 3.7
[insurance_option_selected] => 0
[custom] => XX
[payer_status] => unverified
[business] => XX
[address_country] => United States
[shipping_option_amount] => 16.95
[num_cart_items] => 1
[mc_handling1] => 0.00
[address_city] => XX
[verify_sign] => XX
[payer_email] => XX
[mc_shipping1] => 0.00
[tax1] => 0.00
[txn_id] => XX
[payment_type] => instant
[last_name] => XX
[address_state] => MO
[item_name1] => End Caps
[receiver_email] => XX
[payment_fee] => 4.13
[quantity1] => 1
[insurance_amount] => 0.00
[receiver_id] => XX
[txn_type] => cart
[mc_gross_1] => 115.20
[mc_currency] => USD
[residence_country] => US
[receipt_id] => XX
[transaction_subject] => XX
[payment_gross] => 132.15
[shipping_is_default] => 1
[ipn_track_id] => XX
Second transaction - Shipping option name was not recorded or returned by IPN
------------
OUR INSTANT UPDATE RESPONSE
-----------
METHOD=CallbackResponse
&L_SHIPPINGOPTIONLABEL0=Ground
&L_SHIPPINGOPTIONAMOUNT0=16.95
&L_TAXAMT0=0
&L_SHIPPINGOPTIONISDEFAULT0=true
&L_SHIPPINGOPTIONLABEL1=3-Day
&L_SHIPPINGOPTIONAMOUNT1=45
&L_TAXAMT1=0
&L_SHIPPINGOPTIONISDEFAULT1=false
&L_SHIPPINGOPTIONLABEL2=2-Day
&L_SHIPPINGOPTIONAMOUNT2=60
&L_TAXAMT2=0
&L_SHIPPINGOPTIONISDEFAULT2=false
&L_SHIPPINGOPTIONLABEL3=Next Day - Standard (Afternoon)
&L_SHIPPINGOPTIONAMOUNT3=85
&L_TAXAMT3=0
&L_SHIPPINGOPTIONISDEFAULT3=false
&L_SHIPPINGOPTIONLABEL4=Next Day - Priority (Morning)
&L_SHIPPINGOPTIONAMOUNT4=100
&L_TAXAMT4=0
&L_SHIPPINGOPTIONISDEFAULT4=false
------------
IPN DATA FROM PAYPAL
-----------
[p] => store/paypal-checkout-response
[mc_gross] => 132.15
[protection_eligibility] => Eligible
[address_status] => confirmed
[item_number1] => 18827
[payer_id] => XX
[tax] => 0.00
[address_street] => XX
[payment_date] => 07:11:37 Jan 23, 2014 PST
[payment_status] => Completed
[charset] => windows-1252
[address_zip] => XX
[mc_shipping] => 16.95
[mc_handling] => 0.00
[first_name] => XX
[mc_fee] => 4.13
[address_country_code] => US
[address_name] => XX
[notify_version] => 3.7
[custom] => XX
[payer_status] => verified
[business] => XX
[address_country] => United States
[num_cart_items] => 1
[mc_handling1] => 0.00
[address_city] => XX
[verify_sign] => XX
[payer_email] => XX
[mc_shipping1] => 0.00
[tax1] => 0.00
[txn_id] => XX
[payment_type] => instant
[last_name] => XX
[address_state] => MO
[item_name1] => End Caps
[receiver_email] => XX
[payment_fee] => 4.13
[quantity1] => 1
[receiver_id] => XX
[txn_type] => cart
[mc_gross_1] => 115.20
[mc_currency] => USD
[residence_country] => US
[transaction_subject] => XX
[payment_gross] => 132.15
[ipn_track_id] => XX
Any help would be greatly appreciated!

It all comes down to the DoExpressCheckoutPayment requestion. You need to make sure to pass all the details about the shipping and address in this final call or it won't get included in the transaction details which means it won't be available in IPN.

Related

Simple mysqli_query Insert into table (auto_increment)

msa6#outlook.com
postArray ( [zip] => 81007 [st] => co [dist] => 13 [email] => msa6#outlook.com [pw] => msa12345 [sq] => hot [sa] => dog [comment] => 8/8 original )
INSERT INTO mbr (zip,st,dist,email,pw,sq,sa) VALUES (81007,co,13,msa6#outlook.com,msa12345,hot,dog)
Problem in recording your member data. Please try again later. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '#outlook.com,msa12345,hot,dog)' at line 1
varchars or characters should be enclosed in single quotes
Example:
'msa6#outlook.com'

sugarcrm 6.5 set number columns to 3 in one tab/panel, 2 in other tabs

I know how to set the columns in a detailview to 3 columns instead of the default 2 by putting into detailviewdefs.php
(in modules/EvMgr_Pgm/metadata if creating a custom module
or in custom/modules/EvMgr_Pgm/metadata if editing an existing module)
'maxColumns' => '3',
'widths' =>
array (
0 =>
array (
'label' => '8',
'field' => '19',
),
1 =>
array (
'label' => '8',
'field' => '19',
),
2 =>
array (
'label' => '8',
'field' => '19',
),
),
However, that sets the columns for ALL the tabs/panels in a detailview
Is there a way I can have there be 3 columns in one tab/panel and 2 columns (default) in the other tabs/panels?
If you change the widths to exceed 100 it'll recalculate the widths for a panel/table that has 3 or more columns. Try this:
'maxColumns' => '3',
'widths' =>
array (
0 =>
array (
'label' => '10',
'field' => '30',
),
1 =>
array (
'label' => '10',
'field' => '30',
),
2 =>
array (
'label' => '10',
'field' => '30',
),
),
This uses the standard 2 column 10/30 width. When a panel is created with 3 columns it'll recalculate the widths since it is greater than 100. At least as of 6.5.18 it does. Most likely it does for previous versions as well.

Searching Record in mongodb using php

I am getting the records from collections in following format using find() function of mongodb
Array
(
[_id] => MongoId Object
(
[$id] => 52a9b86578e9288a378b4567
)
[0] => Array
(
[senderID] => 1
[followingID] => 15
[type] => TW
)
[1] => Array
(
[senderID] => 1
[followingID] => 16
[type] => TW
)
[2] => Array
(
[senderID] => 1
[followingID] => 17
[type] => TW
)
[3] => Array
(
[senderID] => 2
[followingID] => 17
[type] => TW
)
)
Now I want all the records whose senderID is 2. I have tried by passing array in find function
$myarray("senderID"=> 1)
$collection->find($myarray)
but it will not get the correct record.

Getting last row in mongodb

I am using find() function in mongodb and got a record in following format
Array
(
[_id] => MongoId Object
(
[$id] => 52a561ea78e9288b568b4567
)
[friendID] => 1
[name] => Shobhit Srivastav
[senderID] => 2
[receiverID] => 1386570218
[receiverType] => TW
[receiverUserID] => 3
[status] => 0
)
Array
(
[_id] => MongoId Object
(
[$id] => 52a5623178e928d8568b4567
)
[friendID] => 2
[name] => Sachin Tendulkar
[senderID] => 2
[receiverID] => 1386570289
[receiverType] => TW
[receiverUserID] => 3
[status] => 0
)
but I want record of last row which are inserted in the table. how can I find??
Thanks in advance!!
If you want to get last record inserted in the table, then sort by ObjectId in descending order:
sorting on an _id field that stores ObjectId values is roughly
equivalent to sorting by creation time.
and get first record:
db.collection.find().sort( { _id : -1 } ).limit(1);
With php driver it will look like
$doc = $collection->find()->sort(array("_id" => -1))->limit(1)->getNext();

How can I find a bounding box that encapsulates a specific point?

[uppercaseName] => ATLANTA, GA
[description] => Atlanta, GA
[name] => Atlanta, GA
[_id] => MongoId Object (
)
[addedOn] => MongoDate Object (
[sec] => 1318879015
[usec] => 517000
)
[excludePoints] => Array (
)
[boundingBox] => Array (
[0] => Array (
[lon] => -84.516
[lat] => 33.6747
)
[1] => Array (
[lon] => -84.516
[lat] => 33.8232
)
[2] => Array (
[lon] => -84.2599
[lat] => 33.8232
)
[3] => Array (
[lon] => -84.2599
[lat] => 33.6747
)
)
That's my document (in MongoDB). I have several such documents and I want to run a query to find all documents that have a bounding box that encapsulates that specific Long and Lat. How would I do this?
Unfortunately, this is not currently possible with MongoDB. MongoDB can index points and find all of the documents inside an area, but cannot index areas and query all of the documents containing an area that encloses a gives point.
There is a feature request for this: https://jira.mongodb.org/browse/SERVER-2874
Presently there is no scheduled date for this feature. Please vote for it!
For more information on Geospatial Indexing and what it is capable of, please see the MongoDB documentation:
http://www.mongodb.org/display/DOCS/Geospatial+Indexing