Paypal Express Checkout Shipping Callback - magento

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,

Related

Cannot create payouts: this account has requirements that need to be collected. in Laravel connecting to Stripe

when want to connect to Stripe api to payout blance of my wallet to one customer account card, i faced this prblem.
acctually my laravel codes is:
**$card_obj = $stripe->tokens->create([
'card' => [
'number' => '4000051240000005',
'exp_month' => 8,
'exp_year' => 2023,
'cvc' => '314',
'currency' => 'cad',
],
]);
$account = $stripe->accounts->create([
'type' => 'express',
'country' => 'CA',
'capabilities' => [
'card_payments' => ['requested' => true],
'transfers' => ['requested' => true],
],
'external_account' => $card_obj->id,
]);
$payout = $stripe->payouts->create([
'amount' => 1,
'currency' => 'cad',
], [
'stripe_account' => $account->id,
]);**
and the error that response returned:
enter image description here
You cannot create a Stripe connect account and immediately start creating payouts for it. If you were to retrieve that Account through the API you'd probably see that it has a number of requirements (see api ref) that are still unfulfilled and payouts_enabled (see api ref) is false.
Connect account owners are expected to provide this missing information during the onboarding process (see https://stripe.com/docs/connect/express-accounts for how to implement an onboarding flow), and once payouts_enabled becomes true on the Account you should be able to generate payouts.

How to get the rate of a specific service - EasyPost ruby?

Trying to retrieve shipping rates for India Post but do not know how. I'm following the Getting Started guide.
to_address = EasyPost::Address.create(
:name => 'Dr. Steve Brule',
:street1 => 'Ravindra Nath Tagore Marg',
:city => 'Nagpur',
:zip => '440001',
:country => 'IN',
:phone => '310-808-5243'
)
from_address = EasyPost::Address.create(
:company => 'Bera',
:street1 => 'Johari Bazar 14',
:city => 'Jaipur',
:country => 'IN',
:zip => '302003',
:phone => '911800112011'
)
parcel = EasyPost::Parcel.create(
:width => 15.2,
:length => 18,
:height => 9.5,
:weight => 35.1
)
shipment = EasyPost::Shipment.create(
:to_address => to_address,
:from_address => from_address,
:parcel => parcel,
)
rate = shipment.lowest_rate(carriers = ['India Post'], services = ['First'])
Shipment do not include any rate can't figure out what is not right in this example.
Have you added an India Post carrier account through the EasyPost Dashboard. The Getting Started Guide does explain:
Note: Unless you've entered your carrier information for other carriers, you'll just receive USPS rates.
If you want a Shipment to only return rates for one carrier, pass that carrier account ID along with the Shipment.create call.
You can limit the CarrierAccounts to use for rating by passing the carrier_accounts parameter [source]
EasyPost currently only supports Tracking for IndiaPost as you can see on this page.
In the future, try emailing support#easypost.com for the best advice.

Codeigniter[Angelleye library]: "Receiver PayPal accounts must be unique" error

I have used angelleye/paypal-codeigniter API for implementing the Paypal Adaptive Payment in my Codeigniter Project.
I have the similar setup like that of https://ci.angelleye.com/paypal/samples/demo/ ON MY LOCALHOST
I have developer paypal account which has 2 merchant sandbox account and one sender sandbox account.While payment I am transferring the funds from sender to 2 receivers.
On my localhost I clicked on the link of Adaptive Payment from the three libraries(Payments Pro , Adaptive Payments,PayFlow) mentioned on that page. Everything was working fine till some time back.
But unfortunately now on click of Adaptive Payment link I am getting following errors in $PayPalRequestData as RESPONSE:
Array
(
['Errors'] => array(
[0] => Array
(
[Receiver] =>
[Category] => Application
[Domain] => PLATFORM
[ErrorID] => 579040
[ExceptionID] =>
[Message] => Receiver PayPal accounts must be unique.
[Parameter] => receiver
[Severity] => Error
[Subdomain] => Application
)
[Ack] => Failure
[Build] => 20420247
[CorrelationID] => 581ecdae58e50
[Timestamp] => 2016-03-04T01:41:05.725-08:00
[PayKey] =>
[PaymentExecStatus] =>
[RedirectURL] =>
[XMLRequest] => <displayed request string>
[XMLResponse] => <displayed response string>
)
Array
(
['Errors'] => array(
[0] => Array
(
[Receiver] =>
[Category] => Application
[Domain] => PLATFORM
[ErrorID] => 579017
[ExceptionID] =>
[Message] =>The amount for the primary receiver must be greater than
or equal to the total of other chained receiver amounts
[Parameter] => receiver
[Severity] => Error
[Subdomain] => Application
)
[Ack] => Failure
[Build] => 20420247
[CorrelationID] => d85cb50b00e2e
[Timestamp] => 2016-03-04T01:46:01.853-08:00
[PayKey] =>
[PaymentExecStatus] =>
[RedirectURL] =>
[XMLRequest] => <displayed request string>
[XMLResponse] => <displayed response string>
)
The REQUEST I sent is
$Receiver = array(
'Amount' = '12.00',
'Email' = 'receiver_1#domain.com',
'InvoiceID' = '123-ABCDEFG',
'PaymentType' = 'SERVICE',
'PaymentSubType' = '',
'Phone' = array('CountryCode' = '', 'PhoneNumber' = '',
'Extension' = ''),
'Primary' = 'true'
);
$Receiver = array(
'Amount' = '5.00',
'Email' = 'receiver_2#domain.com',
'InvoiceID' = '123-ABCDEFG',
'PaymentType' = 'SERVICE',
'PaymentSubType' = '',
'Phone' = array('CountryCode' = '', 'PhoneNumber' = '',
'Extension' = ''),
'Primary' = 'true'
);
Can someone please tell me what there errors are? and how to solve those errors.

How to debug CI-Merchant Paypal Pro integration?

I'm trying to use the CI-Merchant library for integrating Paypal Pro (Direct Payment) and I am lost..
I have setup a UK sandbox (both a seller account preconfigured with paypal pro, and a buyer account with the info below ($params array)
Here is the response I'm getting (status failed, no message) along with the $params array I am using:
Merchant_response Object
(
[_status:protected] => failed
[_message:protected] =>
[_reference:protected] =>
[_data:protected] =>
[_redirect_url:protected] =>
[_redirect_method:protected] => GET
[_redirect_message:protected] =>
[_redirect_data:protected] =>
)
Array
(
[card_type] => Visa
[card_no] => 4269072658337891
[first_name] => Buyer
[last_name] => One
[address1] => 1 Main Terrace
[city] => Wolverhampton
[region] => West Midlands
[postcode] => W12 4LQ
[amount] => 10
[currency] => GBP
[country] => UK
)
And here is the code:
$this->load->library('merchant');
$this->merchant->load('paypal_pro');
$settings = array(
'username' => '***',
'password' => '***',
'signature' => '***',
'test_mode' => true);
$this->merchant->initialize($settings);
//params array is set through a form submit.
$response = $this->merchant->purchase($params);
echo '<pre>';
print_r($response);
print_r($params);
exit;
Please let me know how to to debug this!
Thank you,
Georges
after this code
$this->load->library('merchant');
$this->merchant->load('paypal_pro');
you need to initialize
$settings = $this->merchant->default_settings();
and bingo

How are Authorize.net Silent Post refunds identified?

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
)

Resources