Jump to content


Photo

Getting Payment-Method When Using Paypal Plus


  • Please log in to reply
No replies to this topic

#1 basenic

basenic

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 14 July 2015 - 08:38 AM

Hello,

I'm using the Paypal-SDK for integrating Paypal Plus into our onlineshop. With Paypal Plus the customer has the ability to choose between different payment methods. I´ve got it working so far, my only problem is now, that I can't distinguish from the paypal-response, which payment method (paypal, credit card, payment in advance) was choosen.

 

Is it possible to find out which payment method was choosen?

 

Best regards,

Otto

 

Following up you will find the response-code from paypal:

PayPal\Api\Payment Object
(
    [_propMap:PayPal\Common\PayPalModel:private] => Array
        (
            [id] => PAY-2P51713342307124WKWSMFDA
            [create_time] => 2015-07-14T08:04:28Z
            [update_time] => 2015-07-14T08:06:48Z
            [state] => approved
            [intent] => sale
            [payer] => PayPal\Api\Payer Object
                (
                    [_propMap:PayPal\Common\PayPalModel:private] => Array
                        (
                            [payment_method] => paypal
                            [payer_info] => PayPal\Api\PayerInfo Object
                                (
                                    [_propMap:PayPal\Common\PayPalModel:private] => Array
                                        (
                                            [email] => info@basenic.de
                                            [first_name] => Test
                                            [last_name] => Test
                                            [payer_id] => 9FDFCGB6FBU4A
                                            [shipping_address] => PayPal\Api\ShippingAddress Object
                                                (
                                                    [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                        (
                                                            [line1] => aaa
                                                            [city] => bbb
                                                            [state] => 
                                                            [postal_code] => 94315
                                                            [country_code] => DE
                                                            [recipient_name] => Test Test
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [transactions] => Array
                (
                    [0] => PayPal\Api\Transaction Object
                        (
                            [_propMap:PayPal\Common\PayPalModel:private] => Array
                                (
                                    [amount] => PayPal\Api\Amount Object
                                        (
                                            [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                (
                                                    [total] => 22.00
                                                    [currency] => EUR
                                                    [details] => PayPal\Api\Details Object
                                                        (
                                                            [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                                (
                                                                    [subtotal] => 20.00
                                                                    [shipping] => 2.00
                                                                )

                                                        )

                                                )

                                        )

                                    [description] => Testbeschreibung
                                    [item_list] => PayPal\Api\ItemList Object
                                        (
                                            [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                (
                                                    [items] => Array
                                                        (
                                                            [0] => PayPal\Api\Item Object
                                                                (
                                                                    [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                                        (
                                                                            [name] => Testitem 1
                                                                            [price] => 10.00
                                                                            [currency] => EUR
                                                                            [quantity] => 1
                                                                        )

                                                                )

                                                            [1] => PayPal\Api\Item Object
                                                                (
                                                                    [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                                        (
                                                                            [name] => Testitem 2
                                                                            [price] => 10.00
                                                                            [currency] => EUR
                                                                            [quantity] => 1
                                                                        )

                                                                )

                                                        )

                                                    [shipping_address] => PayPal\Api\ShippingAddress Object
                                                        (
                                                            [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                                (
                                                                    [recipient_name] => Test Test
                                                                    [line1] => aaa
                                                                    [city] => bbb
                                                                    [state] => 
                                                                    [postal_code] => 94315
                                                                    [country_code] => DE
                                                                )

                                                        )

                                                )

                                        )

                                    [related_resources] => Array
                                        (
                                            [0] => PayPal\Api\RelatedResources Object
                                                (
                                                    [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                        (
                                                            [sale] => PayPal\Api\Sale Object
                                                                (
                                                                    [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                                        (
                                                                            [id] => 3VR04215SB522850X
                                                                            [create_time] => 2015-07-14T08:04:28Z
                                                                            [update_time] => 2015-07-14T08:06:48Z
                                                                            [amount] => PayPal\Api\Amount Object
                                                                                (
                                                                                    [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                                                        (
                                                                                            [total] => 22.00
                                                                                            [currency] => EUR
                                                                                        )

                                                                                )

                                                                            [payment_mode] => INSTANT_TRANSFER
                                                                            [state] => completed
                                                                            [protection_eligibility] => ELIGIBLE
                                                                            [protection_eligibility_type] => ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE
                                                                            [parent_payment] => PAY-2P51713342307124WKWSMFDA
                                                                            [transaction_fee] => PayPal\Api\Currency Object
                                                                                (
                                                                                    [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                                                        (
                                                                                            [value] => 0.77
                                                                                            [currency] => EUR
                                                                                        )

                                                                                )

                                                                            [links] => Array
                                                                                (
                                                                                    [0] => PayPal\Api\Links Object
                                                                                        (
                                                                                            [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                                                                (
                                                                                                    [href] => https://api.sandbox.paypal.com/v1/payments/sale/3VR04215SB522850X
                                                                                                    [rel] => self
                                                                                                    [method] => GET
                                                                                                )

                                                                                        )

                                                                                    [1] => PayPal\Api\Links Object
                                                                                        (
                                                                                            [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                                                                (
                                                                                                    [href] => https://api.sandbox.paypal.com/v1/payments/sale/3VR04215SB522850X/refund
                                                                                                    [rel] => refund
                                                                                                    [method] => POST
                                                                                                )

                                                                                        )

                                                                                    [2] => PayPal\Api\Links Object
                                                                                        (
                                                                                            [_propMap:PayPal\Common\PayPalModel:private] => Array
                                                                                                (
                                                                                                    [href] => https://api.sandbox.paypal.com/v1/payments/payment/PAY-2P51713342307124WKWSMFDA
                                                                                                    [rel] => parent_payment
                                                                                                    [method] => GET
                                                                                                )

                                                                                        )

                                                                                )

                                                                        )

                                                                )

                                                        )

                                                )

                                        )

                                )

                        )

                )

            [links] => Array
                (
                    [0] => PayPal\Api\Links Object
                        (
                            [_propMap:PayPal\Common\PayPalModel:private] => Array
                                (
                                    [href] => https://api.sandbox.paypal.com/v1/payments/payment/PAY-2P51713342307124WKWSMFDA
                                    [rel] => self
                                    [method] => GET
                                )

                        )

                )

        )

)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users