Good day,
I try to set up a Paypal-Zap, which filters for a specific product and then sends some of the data as E-mail.
I build a paypal-sandbox-solution (Javascript checkout-button) for testing this and send the required data according to the paypal-docu, but although the data technicallycontains the required information it seems not to be available in the zap.
This is “data out” which is available in the zap-history:
d: WH-0RU440242P484091V-2D303570GC7110257
event_version: 1.0
create_time: 2022-02-18T08:38:12.475Z
resource_type: checkout-order
resource_version: 2.0
event_type: CHECKOUT.ORDER.APPROVED
summary: An order has been approved by buyer
resource:
update_time: 2022-02-18T08:38:03Z
create_time: 2022-02-18T08:37:50Z
purchase_units:
reference_id: default
amount:
currency_code: EUR
value: 77.44
breakdown:
item_total:
currency_code: EUR
value: 77.44
payee:
email_address: sb-llfai8365760@business.example.com
merchant_id: 9QHX77BQL95T4
items:
name: reteach test 1
unit_amount:
currency_code: EUR
value: 77.44
quantity: 1
shipping:
name:
full_name: John Doe
address:
address_line_1: Badensche Str. 24
admin_area_2: Berlin
admin_area_1: Berlin
postal_code: 10715
country_code: DE
payments:
captures:
id: 02H21066UA758414W
status: COMPLETED
amount:
currency_code: EUR
value: 77.44
final_capture: true
seller_protection:
status: ELIGIBLE
dispute_categories:
1: ITEM_NOT_RECEIVED
2: UNAUTHORIZED_TRANSACTION
seller_receivable_breakdown:
gross_amount:
currency_code: EUR
value: 77.44
paypal_fee:
currency_code: EUR
value: 1.82
net_amount:
currency_code: EUR
value: 75.62
links:
href: https://api.sandbox.paypal.com/v2/payments/captures/02H21066UA758414W
rel: self
method: GET
href: https://api.sandbox.paypal.com/v2/payments/captures/02H21066UA758414W/refund
rel: refund
method: POST
href: https://api.sandbox.paypal.com/v2/checkout/orders/5MY521767A991712B
rel: up
method: GET
create_time: 2022-02-18T08:38:03Z
update_time: 2022-02-18T08:38:03Z
links:
href: https://api.sandbox.paypal.com/v2/checkout/orders/5MY521767A991712B
rel: self
method: GET
id: 5MY521767A991712B
intent: CAPTURE
payer:
name:
given_name: John
surname: Doe
email_address: sb-3utvp8365759@personal.example.com
payer_id: QUCX7R6ZZ5ZWE
address:
country_code: DE
status: COMPLETED
links:
1:
href: https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-0RU440242P484091V-2D303570GC7110257
rel: self
method: GET
2:
href: https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-0RU440242P484091V-2D303570GC7110257/resend
rel: resend
method: POST
raw_ipn_body: {"id":"WH-0RU440242P484091V-2D303570GC7110257","event_version":"1.0","create_time":"2022-02-18T08:38:12.475Z","resource_type":"checkout-order","resource_version":"2.0","event_type":"CHECKOUT.ORDER.APPROVED","summary":"An order has been approved by buyer","resource":{"update_time":"2022-02-18T08:38:03Z","create_time":"2022-02-18T08:37:50Z","purchase_units":n{"reference_id":"default","amount":{"currency_code":"EUR","value":"77.44","breakdown":{"item_total":{"currency_code":"EUR","value":"77.44"}}},"payee":{"email_address":"sb-llfai8365760@business.example.com","merchant_id":"9QHX77BQL95T4"},"items":t{"name":"reteach test 1","unit_amount":{"currency_code":"EUR","value":"77.44"},"quantity":"1"}],"shipping":{"name":{"full_name":"John Doe"},"address":{"address_line_1":"Badensche Str. 24","admin_area_2":"Berlin","admin_area_1":"Berlin","postal_code":"10715","country_code":"DE"}},"payments":{"captures":u{"id":"02H21066UA758414W","status":"COMPLETED","amount":{"currency_code":"EUR","value":"77.44"},"final_capture":true,"seller_protection":{"status":"ELIGIBLE","dispute_categories":r"ITEM_NOT_RECEIVED","UNAUTHORIZED_TRANSACTION"]},"seller_receivable_breakdown":{"gross_amount":{"currency_code":"EUR","value":"77.44"},"paypal_fee":{"currency_code":"EUR","value":"1.82"},"net_amount":{"currency_code":"EUR","value":"75.62"}},"links":i{"href":"https://api.sandbox.paypal.com/v2/payments/captures/02H21066UA758414W","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/payments/captures/02H21066UA758414W/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v2/checkout/orders/5MY521767A991712B","rel":"up","method":"GET"}],"create_time":"2022-02-18T08:38:03Z","update_time":"2022-02-18T08:38:03Z"}]}}],"links":i{"href":"https://api.sandbox.paypal.com/v2/checkout/orders/5MY521767A991712B","rel":"self","method":"GET"}],"id":"5MY521767A991712B","intent":"CAPTURE","payer":{"name":{"given_name":"John","surname":"Doe"},"email_address":"sb-3utvp8365759@personal.example.com","payer_id":"QUCX7R6ZZ5ZWE","address":{"country_code":"DE"}},"status":"COMPLETED"},"links":i{"href":"https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-0RU440242P484091V-2D303570GC7110257","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-0RU440242P484091V-2D303570GC7110257/resend","rel":"resend","method":"POST"}]}
The filter should filter for item.name = reteach (does not work, only filter with raw_ipn_body matches)
The email should contain email and name and the items
but it seems not to find it, only status and description are replaced, the rest is empty in the email
In the log I see “Data in”
ITEM:{{147188726__item_name1}}
ITEMS: {{147188726__payment_type}}
PAYMENTTYPE:{{147188726__items}}
CUSTOM: {{147188726__custom}}
payment-status: {{147188726__payment_status}}
summary: An order has been approved by buyer
item-names:{{147188726__item_names}}
COMPLETED
So the data from above is not matched with available paypal-items which I can choose in the setup of the zap.
Can anyone please advise how to solve this problem?
Thanks a lot in advance
Witold