How are Authorize.net Silent Post refunds identified? - void

I have successfully integrated the Silent Post feature with our system for ARB subscriptions. What I am now trying to do is when we refund a payment via the merchant interface, how do I distinguish a refund from all other transactions? Is the a special variable that is set for a refunded payment?

x_type will be set to "credit"
Here is an actual Silent Post verifying that (sensitive info is removed/changed)
Array
(
[x_response_code] => 1
[x_response_subcode] => 1
[x_response_reason_code] => 1
[x_response_reason_text] => This transaction has been approved.
[x_auth_code] => 056187
[x_avs_code] => P
[x_trans_id] => 2692444422
[x_invoice_num] => 123
[x_description] =>
[x_amount] => 59.90
[x_method] => CC
[x_type] => credit
[x_cust_id] => 1234
[x_first_name] => John
[x_last_name] => Smith
[x_company] =>
[x_address] =>
[x_city] =>
[x_state] =>
[x_zip] =>
[x_country] =>
[x_phone] =>
[x_fax] =>
[x_email] =>
[x_ship_to_first_name] =>
[x_ship_to_last_name] =>
[x_ship_to_company] =>
[x_ship_to_address] =>
[x_ship_to_city] =>
[x_ship_to_state] =>
[x_ship_to_zip] =>
[x_ship_to_country] =>
[x_tax] => 0.0000
[x_duty] => 0.0000
[x_freight] => 0.0000
[x_tax_exempt] => FALSE
[x_po_num] =>
[x_MD5_Hash] => 2A4A7F63DB4390A317E4988430FFA4
[x_cvv2_resp_code] =>
[x_cavv_response] =>
[x_test_request] => false
)

Related

Magento 2: Get Payment Methods (All/Active/Used)Magento

How to get the payment methods in magento 2.
All 3 types:
1) All Payment Methods
2) Active/Enabled Payment Methods
3) Payment Methods that have been used while placing orders
Using Dependency Injection (DI)
Here is the code that you need to write in your Block class.
/**
* Order Payment
*
* #var \Magento\Sales\Model\ResourceModel\Order\Payment\Collection
*/
protected $_orderPayment;
/**
* Payment Helper Data
*
* #var \Magento\Payment\Helper\Data
*/
protected $_paymentHelper;
/**
* Payment Model Config
*
* #var \Magento\Payment\Model\Config
*/
protected $_paymentConfig;
/**
* #param \Magento\Backend\Block\Template\Context $context
* #param \Magento\Sales\Model\ResourceModel\Order\Payment\Collection $orderPayment
* #param \Magento\Payment\Helper\Data $paymentHelper
* #param \Magento\Payment\Model\Config $paymentConfig
* #param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Sales\Model\ResourceModel\Order\Payment\Collection $orderPayment,
\Magento\Payment\Helper\Data $paymentHelper,
\Magento\Payment\Model\Config $paymentConfig,
array $data = []
) {
$this->_orderPayment = $orderPayment;
$this->_paymentHelper = $paymentHelper;
$this->_paymentConfig = $paymentConfig;
parent::__construct($context, $data);
}
/**
* Get all payment methods
*
* #return array
*/
public function getAllPaymentMethods()
{
return $this->_paymentHelper->getPaymentMethods();
}
/**
* Get key-value pair of all payment methods
* key = method code & value = method name
*
* #return array
*/
public function getAllPaymentMethodsList()
{
return $this->_paymentHelper->getPaymentMethodList();
}
/**
* Get active/enabled payment methods
*
* #return array
*/
public function getActivePaymentMethods()
{
return $this->_paymentConfig->getActiveMethods();
}
/**
* Get payment methods that have been used for orders
*
* #return array
*/
public function getUsedPaymentMethods()
{
$collection = $this->_orderPayment;
$collection->getSelect()->group('method');
$paymentMethods[] = array('value' => '', 'label' => 'Any');
foreach ($collection as $col) {
$paymentMethods[] = array('value' => $col->getMethod(), 'label' => $col->getAdditionalInformation()['method_title']);
}
return $paymentMethods;
}
Using Object Manager
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$paymentHelper = $objectManager->get('Magento\Payment\Helper\Data');
$allPaymentMethods = $paymentHelper->getPaymentMethods();
$allPaymentMethodsArray = $paymentHelper->getPaymentMethodList();
var_dump($allPaymentMethodsArray);
var_dump($allPaymentMethods);
$paymentConfig = $objectManager->get('Magento\Payment\Model\Config');
$activePaymentMethods = $paymentConfig->getActiveMethods();
var_dump(array_keys($activePaymentMethods));
$orderPaymentCollection = $objectManager->get('\Magento\Sales\Model\ResourceModel\Order\Payment\Collection');
$orderPaymentCollection->getSelect()->group('method');
$paymentMethods[] = array('value' => '', 'label' => 'Any');
foreach ($orderPaymentCollection as $col) {
$paymentMethods[] = array('value' => $col->getMethod(), 'label' => $col->getAdditionalInformation()['method_title']);
}
var_dump($paymentMethods);
Sample Output of getUsedPaymentMethods():
Array
(
[0] => Array
(
[value] =>
[label] => Any
)
[1] => Array
(
[value] => cashondelivery
[label] => Cash On Delivery
)
[2] => Array
(
[value] => checkmo
[label] => Check / Money order
)
)
Sample Output of getAllPaymentMethodsList():
Array
(
[vault] =>
[substitution] =>
[banktransfer] => Bank Transfer Payment
[cashondelivery] => Cash On Delivery
[checkmo] => Check / Money order
[payflowpro] => Credit Card
[payflow_link] => Credit Card
[payflow_advanced] => Credit Card
[braintree] => Credit Card (Braintree)
[authorizenet_directpost] => Credit Card Direct Post (Authorize.net)
[free] => No Payment Information Required
[braintree_paypal] => PayPal (Braintree)
[paypal_billing_agreement] => PayPal Billing Agreement
[payflow_express_bml] => PayPal Credit
[paypal_express_bml] => PayPal Credit
[paypal_express] => PayPal Express Checkout
[payflow_express] => PayPal Express Checkout Payflow Edition
[hosted_pro] => Payment by cards or by PayPal account
[purchaseorder] => Purchase Order
[braintree_cc_vault] => Stored Cards (Braintree)
[payflowpro_cc_vault] => Stored Cards (Payflow Pro)
)
Sample Output of getAllPaymentMethods():
Array
(
[free] => Array
(
[active] => 1
[model] => Magento\Payment\Model\Method\Free
[order_status] => pending
[title] => No Payment Information Required
[allowspecific] => 0
[sort_order] => 1
[group] => offline
)
[substitution] => Array
(
[active] => 0
[model] => Magento\Payment\Model\Method\Substitution
[allowspecific] => 0
)
[vault] => Array
(
[debug] => 1
[model] => Magento\Vault\Model\VaultPaymentInterface
)
[checkmo] => Array
(
[active] => 1
[model] => Magento\OfflinePayments\Model\Checkmo
[order_status] => pending
[title] => Check / Money order
[allowspecific] => 0
[group] => offline
)
[purchaseorder] => Array
(
[active] => 0
[model] => Magento\OfflinePayments\Model\Purchaseorder
[order_status] => pending
[title] => Purchase Order
[allowspecific] => 0
[group] => offline
)
[banktransfer] => Array
(
[active] => 0
[model] => Magento\OfflinePayments\Model\Banktransfer
[order_status] => pending
[title] => Bank Transfer Payment
[allowspecific] => 0
[group] => offline
)
[cashondelivery] => Array
(
[active] => 0
[model] => Magento\OfflinePayments\Model\Cashondelivery
[order_status] => pending
[title] => Cash On Delivery
[allowspecific] => 0
[group] => offline
)
[paypal_express] => Array
(
[model] => Magento\Paypal\Model\Express
[title] => PayPal Express Checkout
[payment_action] => Authorization
[solution_type] => Mark
[line_items_enabled] => 1
[visible_on_cart] => 1
[visible_on_product] => 1
[allow_ba_signup] => never
[group] => paypal
[authorization_honor_period] => 3
[order_valid_period] => 29
[child_authorization_number] => 1
[verify_peer] => 1
[skip_order_review_step] => 1
)
[paypal_express_bml] => Array
(
[model] => Magento\Paypal\Model\Bml
[title] => PayPal Credit
[group] => paypal
)
[payflow_express] => Array
(
[title] => PayPal Express Checkout Payflow Edition
[payment_action] => Authorization
[line_items_enabled] => 1
[visible_on_cart] => 1
[visible_on_product] => 1
[group] => paypal
[verify_peer] => 1
[model] => Magento\Paypal\Model\PayflowExpress
)
[payflow_express_bml] => Array
(
[model] => Magento\Paypal\Model\Payflow\Bml
[title] => PayPal Credit
[group] => paypal
)
[payflowpro] => Array
(
[model] => Magento\Paypal\Model\Payflow\Transparent
[title] => Credit Card
[payment_action] => Authorization
[cctypes] => AE,VI
[useccv] => 1
[tender] => C
[verbosity] => MEDIUM
[user] =>
[pwd] =>
[group] => paypal
[verify_peer] => 1
[date_delim] =>
[ccfields] => csc,expdate,acct
[place_order_url] => paypal/transparent/requestSecureToken
[cgi_url_test_mode] => https://pilot-payflowlink.paypal.com
[cgi_url] => https://payflowlink.paypal.com
[transaction_url_test_mode] => https://pilot-payflowpro.paypal.com
[transaction_url] => https://payflowpro.paypal.com
[avs_street] => 0
[avs_zip] => 0
[avs_international] => 0
[avs_security_code] => 1
[cc_year_length] => 2
[can_authorize_vault] => 1
[can_capture_vault] => 1
)
[payflowpro_cc_vault] => Array
(
[model] => PayflowProCreditCardVaultFacade
[title] => Stored Cards (Payflow Pro)
)
[paypal_billing_agreement] => Array
(
[active] => 1
[allow_billing_agreement_wizard] => 1
[model] => Magento\Paypal\Model\Method\Agreement
[title] => PayPal Billing Agreement
[group] => paypal
[verify_peer] => 1
)
[payflow_link] => Array
(
[model] => Magento\Paypal\Model\Payflowlink
[payment_action] => Authorization
[verbosity] => HIGH
[user] =>
[pwd] =>
[group] => paypal
[title] => Credit Card
[partner] => PayPal
[csc_required] => 1
[csc_editable] => 1
[url_method] => GET
[email_confirmation] => 0
[verify_peer] => 1
[transaction_url_test_mode] => https://pilot-payflowpro.paypal.com
[transaction_url] => https://payflowpro.paypal.com
[cgi_url_test_mode] => https://pilot-payflowlink.paypal.com
[cgi_url] => https://payflowlink.paypal.com
)
[payflow_advanced] => Array
(
[model] => Magento\Paypal\Model\Payflowadvanced
[payment_action] => Authorization
[verbosity] => HIGH
[user] => PayPal
[pwd] =>
[group] => paypal
[title] => Credit Card
[partner] => PayPal
[vendor] => PayPal
[csc_required] => 1
[csc_editable] => 1
[url_method] => GET
[email_confirmation] => 0
[verify_peer] => 1
[transaction_url_test_mode] => https://pilot-payflowpro.paypal.com
[transaction_url] => https://payflowpro.paypal.com
[cgi_url_test_mode] => https://pilot-payflowlink.paypal.com
[cgi_url] => https://payflowlink.paypal.com
)
[hosted_pro] => Array
(
[model] => Magento\Paypal\Model\Hostedpro
[title] => Payment by cards or by PayPal account
[payment_action] => Authorization
[group] => paypal
[display_ec] => 0
[verify_peer] => 1
)
[authorizenet_directpost] => Array
(
[active] => 0
[cctypes] => AE,VI,MC,DI
[debug] => 0
[email_customer] => 0
[login] =>
[merchant_email] =>
[model] => Magento\Authorizenet\Model\Directpost
[order_status] => processing
[payment_action] => authorize
[test] => 1
[title] => Credit Card Direct Post (Authorize.net)
[trans_key] =>
[trans_md5] =>
[allowspecific] => 0
[currency] => USD
[create_order_before] => 1
[date_delim] => /
[ccfields] => x_card_code,x_exp_date,x_card_num
[place_order_url] => authorizenet/directpost_payment/place
[cgi_url_test_mode] => https://test.authorize.net/gateway/transact.dll
[cgi_url] => https://secure.authorize.net/gateway/transact.dll
[cgi_url_td_test_mode] => https://apitest.authorize.net/xml/v1/request.api
[cgi_url_td] => https://api2.authorize.net/xml/v1/request.api
)
[braintree] => Array
(
[model] => BraintreeFacade
[title] => Credit Card (Braintree)
[payment_action] => authorize
[active] => 0
[is_gateway] => 1
[can_use_checkout] => 1
[can_authorize] => 1
[can_capture] => 1
[can_capture_partial] => 1
[can_authorize_vault] => 1
[can_capture_vault] => 1
[can_use_internal] => 1
[can_refund_partial_per_invoice] => 1
[can_refund] => 1
[can_void] => 1
[can_cancel] => 1
[cctypes] => AE,VI,MC,DI,JCB,CUP,DN,MI
[useccv] => 1
[cctypes_braintree_mapper] => {"american-express":"AE","discover":"DI","jcb":"JCB","mastercard":"MC","master-card":"MC","visa":"VI","maestro":"MI","diners-club":"DN","unionpay":"CUP"}
[order_status] => processing
[environment] => sandbox
[allowspecific] => 0
[sdk_url] => https://js.braintreegateway.com/js/braintree-2.17.6.min.js
[public_key] =>
[private_key] =>
[masked_fields] => cvv,number
[privateInfoKeys] => avsPostalCodeResponseCode,avsStreetAddressResponseCode,cvvResponseCode,processorAuthorizationCode,processorResponseCode,processorResponseText,liabilityShifted,liabilityShiftPossible,riskDataId,riskDataDecision
[paymentInfoKeys] => cc_type,cc_number,avsPostalCodeResponseCode,avsStreetAddressResponseCode,cvvResponseCode,processorAuthorizationCode,processorResponseCode,processorResponseText,liabilityShifted,liabilityShiftPossible,riskDataId,riskDataDecision
)
[braintree_paypal] => Array
(
[model] => BraintreePayPalFacade
[title] => PayPal (Braintree)
[active] => 0
[payment_action] => authorize
[allowspecific] => 0
[require_billing_address] => 0
[allow_shipping_address_override] => 1
[display_on_shopping_cart] => 1
[order_status] => processing
[is_gateway] => 1
[can_use_checkout] => 1
[can_authorize] => 1
[can_capture] => 1
[can_capture_partial] => 1
[can_refund] => 1
[can_refund_partial_per_invoice] => 1
[can_void] => 1
[can_cancel] => 1
[privateInfoKeys] => processorResponseCode,processorResponseText,paymentId
[paymentInfoKeys] => processorResponseCode,processorResponseText,paymentId,payerEmail
)
[braintree_cc_vault] => Array
(
[model] => BraintreeCreditCardVaultFacade
[title] => Stored Cards (Braintree)
)
The output array of of getActivePaymentMethods() is very long. So, I have just printed out the keys of the array. Keys of the output array contains active method’s code.
Sample Output of array_keys(getActivePaymentMethods()):
Array
(
[0] => free
[1] => checkmo
[2] => purchaseorder
[3] => cashondelivery
[4] => paypal_billing_agreement
)

Use user email in Charge (SquareConnect\Api\TransactionsApi)

i try add
'buyer_email_address'=>$post['email'],
and then make $transactions_api->charge
affter this i call $transactions_api->retrieveTransaction
and i dont see 'buyer_email_address'
also i try add
'billing_address'=>array(
'address_line_1'=>$post['address'],
'first_name'=>$post['first_name'],
'last_name'=>$post['last_name']
),
and i dont see this values in transaction details
SquareConnect\Model\Transaction Object
(
...
[tenders:protected] => Array
(
[0] => SquareConnect\Model\Tender Object
(
...
[note:protected] => Online Transaction
[amount_money:protected] => SquareConnect\Model\Money Object
(
[amount:protected] => 100
[currency:protected] => USD
)
[processing_fee_money:protected] =>
[customer_id:protected] =>
[type:protected] => CARD
[card_details:protected] => SquareConnect\Model\TenderCardDetails Object
(
[status:protected] => CAPTURED
[card:protected] => SquareConnect\Model\Card Object
(
[id:protected] =>
[card_brand:protected] => VISA
[last_4:protected] => 5858
[exp_month:protected] =>
[exp_year:protected] =>
[cardholder_name:protected] =>
[billing_address:protected] =>
[fingerprint:protected] =>
)
[entry_method:protected] => KEYED
)
[cash_details:protected] =>
)
)
[refunds:protected] =>
[reference_id:protected] =>
[product:protected] => EXTERNAL_API
[client_id:protected] =>
[order:protected] =>
[shipping_address:protected] =>
How add information about client?
If you would like to add customer information to a transaction, you should Create a Customer and then pass the customer_id along to the Charge endpoint.

Magento AvS_fastsimpleimporter multiple addresses

Is it possible while creating new users with AvS_Fastsimpleimporter to add more than the standard address ?
Currently my array "data" looks like this
'email' => $kunde['email'],
'_website' => $_website,
'_store' => $_website . 'store',
'confirmation' => '',
'created_at' => $created_at,
'created_in' => 'Import',
'disable_auto_group_change' => 0,
'firstname' => $kunde['name_1'],
'group_id' => 3,
'kontonummer' => $kunde['kontonr'],
'kundennummer' => $kunde['kundennr'],
'lastname' => $lastname,
'password_hash' => $password_hash,
'store_id' => 0,
'website_id' => $country['id'],
'_address_city' => $kunde['ort'],
'_address_country_id' => $kunde['land'],
'_address_fax' => $kunde['fax'],
'_address_firstname' => $kunde['name_1'],
'_address_lastname' => $lastname,
'_address_postcode' => $kunde['plz'],
'_address_street' => $kunde['strasse'],
'_address_telephone' => $_address_telephone,
'_address_vat_id' => $kunde['ust_id'],
'_address_default_billing_' => 1,
'_address_default_shipping_' => 1,
And i want to add a second address with the AvS_Simpleimporter.
I tried to add a second array in data like this:
array_push($data, array(
'email' => null,
'_website' => null,
'_address_city' => checkRequiredInput($address['ort']),
'_address_country_id' => $address['land'],
'_address_firstname' => checkRequiredInputVadr($address['name_1']),
'_address_lastname' => checkRequiredInputVadr($address['name_2']),
'_address_postcode' => checkRequiredInput($address['plz']),
'_address_street' => checkRequiredInput($address['strasse']),
'_address_default_billing_' => 0,
'_address_default_shipping_' => 0,
));
And then executing with
$importer = Mage::getModel('fastsimpleimport/import');
$importer->setIgnoreDuplicates('password_hash')->processCustomerImport($data);
But this currently doesn't work. The second address is added as an extra array to data like this
.... data array
....
'_address_default_billing_' => 1
'_address_default_shipping_' => 1
[0] => 'email' => bla bla
'_website' => bla bla
and so son
Any help ?
Multiple addresses are imported as additional rows. Hence you need to:
'_address_country_id' => array($country1,$country2),
'_address_city' => array($city1, $city2),
....

How to get order cancel date in Magento?

Im working on a order feed. How to get the date on the order that is canceled in Magento as well as the ship date when a tracking number is updated?
To get the order cancel date you can parse the order comments and get date of the first Canceled status of the comment like so:
$order = Mage::getModel('sales/order')->loadByIncrementId(100000050);
$commentCollection = $order->getStatusHistoryCollection();
foreach ($commentCollection as $comment) {
if ($comment->getStatus() === Mage_Sales_Model_Order::STATE_CANCELED) {
$orderCancelDate = $comment->getCreatedAt();
}
}
echo $orderCancelDate;
Output:
2014-02-11 03:43:09 <- Date\time order was marked `Canceled`
To get the shipping date/time(s) of the order and the date/times(s) of when the tracking number was updated you can get everything like so:
$order = Mage::getModel('sales/order')->loadByIncrementId(100000054);
$shipmentCollection = $order->getShipmentsCollection();
foreach ($shipmentCollection as $shipment) {
// Date/Time when order shipment(s) were created
echo $shipment->getCreatedAt() . "<br />";
foreach($shipment->getAllTracks() as $trackingNumber) {
// Date/Time when the tracking number(s) were updated
echo $trackingNumber->getUpdatedAt();
// Date/Time when the tracking number(s) were added
// echo $trackingNumber->getCreatedAt();
}
}
Output:
2014-02-11 05:35:10 <- Date\time order was marked `Shipped`
2014-02-11 05:35:38 <- Date\time tracking number(s) were updated
Just remember, an order can have multiple partial shipments and multiple tracking numbers per partial shipments which is why you have to loop through them all to get the correct date\time(s).
Good luck!
The Mage::getModel('sales/order') model contain all sales and order details.
You can use this ,
consider '10003' is the order no,
$order = Mage::getModel('sales/order')->load(10003);
$_totalData = $order->getData();
print_r($_totalData);
$_totalData will then contain the following:
Array
(
[entity_id] => 45
[state] => processing
[status] => pending
[coupon_code] => stickytest
[protect_code] => 1036b0
[shipping_description] => Voucher code discount
[is_virtual] => 0
[store_id] => 1
[customer_id] =>
[base_discount_amount] => -195.0000
[base_discount_canceled] =>
[base_discount_invoiced] =>
[base_discount_refunded] =>
[base_grand_total] => 0.0000
[base_shipping_amount] => 0.0000
[base_shipping_canceled] =>
[base_shipping_invoiced] =>
[base_shipping_refunded] =>
[base_shipping_tax_amount] => 0.0000
[base_shipping_tax_refunded] =>
[base_subtotal] => 177.2700
[base_subtotal_canceled] =>
[base_subtotal_invoiced] =>
[base_subtotal_refunded] =>
[base_tax_amount] => 0.0000
[base_tax_canceled] =>
[base_tax_invoiced] =>
[base_tax_refunded] =>
[base_to_global_rate] => 1.0000
[base_to_order_rate] => 1.0000
[base_total_canceled] =>
[base_total_invoiced] =>
[base_total_invoiced_cost] =>
[base_total_offline_refunded] =>
[base_total_online_refunded] =>
[base_total_paid] =>
[base_total_qty_ordered] =>
[base_total_refunded] =>
[discount_amount] => -195.0000
[discount_canceled] =>
[discount_invoiced] =>
[discount_refunded] =>
[grand_total] => 0.0000
[shipping_amount] => 0.0000
[shipping_canceled] =>
[shipping_invoiced] =>
[shipping_refunded] =>
[shipping_tax_amount] => 0.0000
[shipping_tax_refunded] =>
[store_to_base_rate] => 1.0000
[store_to_order_rate] => 1.0000
[subtotal] => 177.2700
[subtotal_canceled] =>
[subtotal_invoiced] =>
[subtotal_refunded] =>
[tax_amount] => 0.0000
[tax_canceled] =>
[tax_invoiced] =>
[tax_refunded] =>
[total_canceled] =>
[total_invoiced] =>
[total_offline_refunded] =>
[total_online_refunded] =>
[total_paid] =>
[total_qty_ordered] => 1.0000
[total_refunded] =>
[can_ship_partially] =>
[can_ship_partially_item] =>
[customer_is_guest] => 1
[customer_note_notify] => 1
[billing_address_id] => 89
[customer_group_id] => 0
[edit_increment] =>
[email_sent] => 1
[forced_shipment_with_invoice] =>
[gift_message_id] =>
[payment_auth_expiration] =>
[paypal_ipn_customer_notified] =>
[quote_address_id] =>
[quote_id] => 215
[shipping_address_id] => 90
[adjustment_negative] =>
[adjustment_positive] =>
[base_adjustment_negative] =>
[base_adjustment_positive] =>
[base_shipping_discount_amount] => 0.0000
[base_subtotal_incl_tax] => 195.0000
[base_total_due] =>
[payment_authorization_amount] =>
[shipping_discount_amount] => 0.0000
[subtotal_incl_tax] => 195.0000
[total_due] =>
[weight] => 1.0000
[customer_dob] =>
[increment_id] => 100000034
[applied_rule_ids] => 4
[base_currency_code] => AUD
[customer_email] => someone#somewhere.com
[customer_firstname] => billing[firstname]
[customer_lastname] => billing[lastname]
[customer_middlename] =>
[customer_prefix] =>
[customer_suffix] =>
[customer_taxvat] =>
[discount_description] => stickytest
[ext_customer_id] =>
[ext_order_id] =>
[global_currency_code] => AUD
[hold_before_state] =>
[hold_before_status] =>
[order_currency_code] => AUD
[original_increment_id] =>
[relation_child_id] =>
[relation_child_real_id] =>
[relation_parent_id] =>
[relation_parent_real_id] =>
[remote_ip] => 192.168.0.18
[shipping_method] => matrixrate_matrixrate_free
[store_currency_code] => AUD
[store_name] => Main Website
Main Store
English
[x_forwarded_for] =>
[customer_note] =>
[created_at] => 2012-11-19 10:53:11
[updated_at] => 2012-11-19 10:53:12
[total_item_count] => 1
[customer_gender] =>
[base_custbalance_amount] =>
[currency_base_id] =>
[currency_code] =>
[currency_rate] =>
[custbalance_amount] =>
[is_hold] =>
[is_multi_payment] =>
[real_order_id] =>
[tax_percent] =>
[tracking_numbers] =>
[hidden_tax_amount] => 17.7300
[base_hidden_tax_amount] => 17.7300
[shipping_hidden_tax_amount] => 0.0000
[base_shipping_hidden_tax_amnt] => 0.0000
[hidden_tax_invoiced] =>
[base_hidden_tax_invoiced] =>
[hidden_tax_refunded] =>
[base_hidden_tax_refunded] =>
[shipping_incl_tax] => 0.0000
[base_shipping_incl_tax] => 0.0000
[onestepcheckout_customercomment] => onestepcheckout_comments
[onestepcheckout_customerfeedback] => Google
[payment_authorization_expiration] =>
[forced_do_shipment_with_invoice] =>
[base_shipping_hidden_tax_amount] => 0.0000
)
For more information follow this link ..

Paypal Express Checkout Shipping Callback

We have sent the following question to PayPal's technical support and still no news after 2 weeks. I hope someone here can help us :)
We are currently trying to make PayPal Express Checkout work with Magento.
Our shipping callback script is being called.
If the script sends backs the following response (UPS options only), everything works as expected in PayPal:
L_SHIPPINGOPTIONISDEFAULT0=true&L_SHIPPINGOPTIONAMOUNT0=19.03&L_SHIPPINGOPTIONLABEL0=ups_11&L_SHIPPINGOPTIONNAME0=United+Parcel+Service+-+UPS+Standard&L_TAXAMT0=5.98&L_SHIPPINGOPTIONISDEFAULT1=false&L_SHIPPINGOPTIONAMOUNT1=23.42&L_SHIPPINGOPTIONLABEL1=ups_13&L_SHIPPINGOPTIONNAME1=United+Parcel+Service+-+UPS+Next+Day+Air+Saver&L_TAXAMT1=5.98&L_SHIPPINGOPTIONISDEFAULT2=false&L_SHIPPINGOPTIONAMOUNT2=28.07&L_SHIPPINGOPTIONLABEL2=ups_01&L_SHIPPINGOPTIONNAME2=United+Parcel+Service+-+UPS+Express&L_TAXAMT2=5.98&METHOD=CallbackResponse
But if we send this response (UPS and rpc for Canada Post) options, PayPal simply ignores our response and displays no shipping options:
L_SHIPPINGOPTIONISDEFAULT0=true&L_SHIPPINGOPTIONAMOUNT0=6.08&L_SHIPPINGOPTIONLABEL0=rcp_1020&L_SHIPPINGOPTIONNAME0=Canada+Post+-+Expedited&L_TAXAMT0=5.19&L_SHIPPINGOPTIONISDEFAULT1=false&L_SHIPPINGOPTIONAMOUNT1=14.74&L_SHIPPINGOPTIONLABEL1=rcp_1040&L_SHIPPINGOPTIONNAME1=Canada+Post+-+Priority&L_TAXAMT1=5.19&L_SHIPPINGOPTIONISDEFAULT2=false&L_SHIPPINGOPTIONAMOUNT2=19.33&L_SHIPPINGOPTIONLABEL2=ups_11&L_SHIPPINGOPTIONNAME2=United+Parcel+Service+-+UPS+Standard&L_TAXAMT2=5.19&L_SHIPPINGOPTIONISDEFAULT3=false&L_SHIPPINGOPTIONAMOUNT3=25.10&L_SHIPPINGOPTIONLABEL3=ups_13&L_SHIPPINGOPTIONNAME3=United+Parcel+Service+-+UPS+Next+Day+Air+Saver&L_TAXAMT3=5.19&L_SHIPPINGOPTIONISDEFAULT4=false&L_SHIPPINGOPTIONAMOUNT4=28.21&L_SHIPPINGOPTIONLABEL4=ups_01&L_SHIPPINGOPTIONNAME4=United+Parcel+Service+-+UPS+Express&L_TAXAMT4=5.19&METHOD=CallbackResponse
Here is the SetExpressCheckout options that is being sent:
[PAYMENTACTION] => Sale
[AMT] => 39.95
[CURRENCYCODE] => USD
[RETURNURL] => {domain url}/paypal/express/return/
[CANCELURL] => {domain url}/paypal/express/cancel/
[INVNUM] => 100000009
[SOLUTIONTYPE] => Sole
[GIROPAYCANCELURL] => {domain url}/paypal/express/cancel/
[GIROPAYSUCCESSURL] => {domain url}/checkout/onepage/success/
[BANKTXNPENDINGURL] => {domain url}/checkout/onepage/success/
[LOCALECODE] => en_US
[ITEMAMT] => 39.95
[TAXAMT] => 0.00
[SHIPPINGAMT] => 0.00
[L_NUMBER0] => ABCDEF
[L_NAME0] => ABCDEF Name
[L_QTY0] => 1
[L_AMT0] => 39.95
[CALLBACK] => {domain url}/paypal/express/shippingOptionsCallback/quote_id/309/
[CALLBACKTIMEOUT] => 6
[MAXAMT] => 1038.95
[L_SHIPPINGOPTIONISDEFAULT0] => true
[L_SHIPPINGOPTIONAMOUNT0] => 0.00
[L_SHIPPINGOPTIONLABEL0] => no_rate
[L_SHIPPINGOPTIONNAME0] => N/A
[L_TAXAMT0] =>
[METHOD] => SetExpressCheckout
[VERSION] => 72.0
[USER] => ****
[PWD] => ****
[SIGNATURE] => ****
[BUTTONSOURCE] => Varien_Cart_EC_CA
We cannot figure out why PayPal is rejecting our shipping options?
Thanks in advance,

Resources