Payment capture being refused when Shipping Method is PickUp
I have a use case to allow in-store pick-up when I create an order with this option and try to authorise it I receive the error Capture order response was not successful. Response status code: 422, testing with the iOS developer looks like we have to set in PurchaseUnit.Shipping a field called name starting with S2S (no other meaningful info is provided in the log), this field is not present in the Shipping object provided by the SDK in version 0.8.8. You can find the error provided by the iOS SDK in the end of this ticket.
Steps to reproduce: 1 - Start the SDK with an Order with:
- Intent:
CAPTURE; - User Action:
PAYNOW; - Shipping Preference:
GET_FROM_FILE; - Purchase Unit with amount and items.
- Purchase Unit - Shipping with only 1 option with type
PICKUPand set the Address;
2 - Try to place the order; 3 - See the error.
Below is the error provided by the iOS SDK:
▿ PayPalCheckout.OrderActionError.errorCapturingFunds
▿ errorCapturingFunds: 5 key/value pairs
▿ (2 elements)
- key: "details"
▿ value: 1 element #0
▿ 2 key/value pairs #1
▿ (2 elements)
- key: issue #2
- super: NSString
- super: NSObject
- value: INVALID_PICKUP_ADDRESS #3
- super: NSMutableString
- super: NSString
- super: NSObject
▿ (2 elements)
- key: description #4
- super: NSString
- super: NSObject
- value: If the 'shipping_option.type' is set as 'PICKUP' then the 'shipping_detail.name.full_name' should start with 'S2S' meaning Ship To Store. Example: 'S2S My Store'. #5
- super: NSMutableString
- super: NSString
- super: NSObject
▿ (2 elements)
- key: "message"
- value: The requested action could not be performed, semantically incorrect, or failed business validation. #6
- super: NSMutableString
- super: NSString
- super: NSObject
▿ (2 elements)
- key: "debug_id"
- value: f429d44a7d8da #7
- super: NSMutableString
- super: NSString
- super: NSObject
▿ (2 elements)
- key: "links"
▿ value: 1 element #8
▿ 3 key/value pairs #9
▿ (2 elements)
- key: rel #10
- super: NSString
- super: NSObject
- value: information_link #11
- super: NSMutableString
- super: NSString
- super: NSObject
▿ (2 elements)
- key: href #12
- super: NSString
- super: NSObject
- value: https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_PICKUP_ADDRESS #13
- super: NSMutableString
- super: NSString
- super: NSObject
▿ (2 elements)
- key: method #14
- super: NSString
- super: NSObject
- value: GET #15
- super: NSString
- super: NSObject
▿ (2 elements)
- key: "name"
- value: UNPROCESSABLE_ENTITY #16
- super: NSMutableString
- super: NSString
- super: NSObject
https://github.com/paypal/android-checkout-sdk/releases/tag/v0.112.0 should allow you to add store name on Android.
For pickup orders "S2S" must be prefixed to the store name for the order to be successful.
Hi @mauro-poq is this still an issue you are facing ? Have you tried reproducing this issue using our latest v1.1 release ?