Taking the REST API out for a spin, and because my frame of reference is "classic API", specifically Express Checkout
, I'm pretty much trying to "map" functionality.
Got things going, so this is more "conceptual" than technical..maybe someday this becomes a "wiki"...
Use case: payment_method:paypal
payer_info
(Paypal user) is only available after an execute
order
(not sale
) thereby allowing an authorization
and capture
after such details become available (to merchant)?GetExpressCheckoutDetails
so this seems to be the path(?)Based on this, and testing, can we assume the "maximum" of 115% (above order
total) for the authorization
call? Based on testing this seems to be true..otherwise "AUTHORIZATION_AMOUNT_LIMIT_EXCEEDED"
Update: In case you were wondering:
you can't update a payment resource. It's actually stated in the link (but I had to try).
you can't "re-execute" either
At this point the only thing that works so far is to authorize < 115%
The sum of the total open authorizations can’t exceed 115% or $75 (whichever is less) of the amount provided to PayPal when the order was created.
REF: https://developer.paypal.com/docs/integration/direct/create-process-order/
In docs, payer
object has status
defined as:
Status of the payer’s PayPal account. Currently supported with
paypal payment_method
only, but available forcredit_card payment_method
at a later date. Allowed values:VERIFIED
orUNVERIFIED
.
It doesn't seem to be returned in either sale
nor order
.
A secondary question therefore becomes, how do you "require" a verified PayPal user (is this now account level setting only - no API override)? See: flow_config
The other "missing" items are documented in the API release notes (e.g. fee
).
Thanks!
Both order
and authorize
intent can be used to accomplish the flow (adjustments to authorization
or capture
) based on PayPal user info.
execute
- returns PayPal payer_info
- e.g.
"payer_info": {
"email": "[email protected]",
"first_name": "Ed",
"last_name": "SF",
"payer_id": "ABCDEFG",
"shipping_address": {
"recipient_name": "Ed SF",
"line1": "111 Some street",
"city": "San Francisco",
"country_code": "US",
"postal_code": "94111",
"state": "CA"
}
}
Based on the above info, if there are any adjustments needed (i.e. sales tax, shipping),
order
can be authorized
for the additional amount* (and subsequently captured
)authorization
can be captured
for the additional amount**additional amount can’t exceed 115% or $75 (whichever is less) of the original order
or authorization
, otherwise, AUTHORIZATION_AMOUNT_LIMIT_EXCEEDED
and CAPTURE_AMOUNT_LIMIT_EXCEEDED
errors are raised respectively.
This is displayed to the user when a capture
greater than the orginal authorization
is made:
As far as I can tell, there isn't a similar message for an order
(with adjusted amounts) - the additional authorization amount is displayed in the transaction details (only).