Zuora. Getting payment associated with payment refund - zuora

How i can get PaymentId associated with a refund using API?
for example, i can get this using builtin callback Payment Refund Processed
But i can't found a way for getting PaymentId using a similar custom callback or REST\SOAP API.
Do you have any idea how i can get paymentId by RefundId without "Invoice Settlement feature"?

Try using refund parts API call as shown below.
../v1/refunds/{refundId}/parts

Related

Monthly or weekly report of PayPal Completed Payments automatically

We can download a CSV or XLS of PayPal Completed Payments by manually going to https://business.paypal.com/merchantdata/reportHome and doing "Activity download":
But how to get this CSV report, automatically (via email or with an API), each week or each month, without having to manually log in on the website?
Note:
I've already looked at PayFlow reports and download-reports but it seems quite complex, and there is no full example (only XML samples but it's unclear how to use them)
I don't want to use IPN for this (I do use it for another task, but it's not perfectly reliable for other reasons, etc.)
Example of desired output:
"Date","Time","TimeZone","Name","Type","Status","Currency","Gross","Fee","Net","From Email Address","To Email Address","Transaction ID","Shipping Address","Address Status","Item Title","Item ID","Shipping and Handling Amount","Insurance Amount","Sales Tax","Option 1 Name","Option 1 Value","Option 2 Name","Option 2 Value","Reference Txn ID","Invoice Number","Custom Number","Quantity","Receipt ID","Balance","Address Line 1","Address Line 2/District/Neighborhood","Town/City","State/Province/Region/County/Territory/Prefecture/Republic","Zip/Postal Code","Country","Contact Phone Number","Subject","Note","Country Code","Balance Impact"
"3/1/2018","04:52:07","CET","John Doe","Website Payment","Completed","EUR","100.00","0","100","johndoe#gmail.com","contact#example.com",...
"3/1/2018","16:29:30","CET","Mike Abcd","Website Payment","Completed","EUR","100.00","0","100","mikeabc#example.com","contact#example.com",...
You will have to do it through the XML api. Basically, you make a post request with the example XML in the link you gave but with your data. The response will be in XML and you take the returned reportId and then call the get report api and it will return in xml the report data.

EWS API: Anything I call update_item for a meeting, it ends up canceling the meeting for any attendees

I'm using the EWS API (targeting Exchange 2010) I cannot figure out why anything I make a request to update a calendar meeting/item. Is there something I'm missing or is this the expected behavior? I'm able to make a change from Outlook to the meeting without it sending out a cancellation email to all attendees except the organizer.
The below is a sample of the relevant portion of the SOAP request. I replaced the actual attendee's email addresses, item ID and change key.
{:send_meeting_invitations_or_cancellations=>"SendOnlyToChanged",:conflict_resolution=>"AutoResolve", :item_changes=>[{:updates=>[{:set_item_field=>{:field_uRI=>{:field_uRI=>"item:Subject"},
:calendar_item=>{:sub_elements=>[{:subject=>{:text=>"Thursday 11AM Recurring"}}]}}},
{:set_item_field=>{:field_uRI=>{:field_uRI=>"item:Body"}, :calendar_item=>{:sub_elements=>[{:body=>{"BodyType"=>"HTML", :text=>"HI"}}]}}},
{:set_item_field=>{:field_uRI=>{:field_uRI=>"calendar:Location"},:calendar_item=>{:sub_elements=>[{:location=>{:text=>"LA, CA"}}]}}},
{:set_item_field=>{:field_uRI=>{:field_uRI=>"calendar:Start"}, :calendar_item=>{:sub_elements=>[{:start=>{:text=>"2019-03-07T19:00:00.0000000"}}]}}},
{:set_item_field=>{:field_uRI=>{:field_uRI=>"calendar:StartTimeZone"}, :calendar_item=>{:sub_elements=>[{:start_time_zone=>{"Id"=>"UTC"}}]}}},
{:set_item_field=>{:field_uRI=>{:field_uRI=>"calendar:End"}, :calendar_item=>{:sub_elements=>[{:end=>{:text=>"2019-03-07T19:30:00.0000000"}}]}}},
{:set_item_field=>{:field_uRI=>{:field_uRI=>"calendar:EndTimeZone"},:calendar_item=>{:sub_elements=>[{:end_time_zone=>{"Id"=>"UTC"}}]}}},
{:set_item_field=>{:field_uRI=>{:field_uRI=>"calendar:RequiredAttendees"},:calendar_item=>{:sub_elements=>[{:required_attendees=>{:sub_elements=>[
{:mailbox=>{:name=>"Joe ABC",:email_address=>"joe#abc.com", :routing_Type=>"SMTP"}},
{:mailbox=>{:name=>"John ABC", :email_address=>"john#abc.com",:routing_Type=>"SMTP"}}]}}]}}}],
:item_id=>{:id=>"AAMkAGJjNWIzNzI2LTM1N2YtNDVkMi05NzU5LTRj",
:change_key=>"DwAAABYAAADWK9s0Y5iSSLP"}}]}
If you use Set_Item_Field to update the required attendees this will overwrite the current property so if any attendees aren't in the updated collection your effectively canceling the meeting for those attendees. If you want to use Set_Item_Field to update attendees then you need to include all the attendees for that type because your replacing the collection for the recipient type not appending to it.

Is it safe to render customer card token in HTML

in the system I'm working on we allow the user to store more than a payment card and then select one to use during checkout.
The card token is a natural identifier for the card so it may seem a good key to use (we store nothing in our app).
Is it safe to render in HTML to card token so we can identify which card to use or are there security concerns?
Please note that I pass the customer id to the gateway to make sure that the card belongs to the customer:
var request = new Braintree.TransactionRequest
{
Amount = order.Total,
CustomerId = braintreeCustomerId,
PaymentMethodNonce = nonce,
PaymentMethodToken = cardToken,
OrderId = order.OrderId,
Options = new Braintree.TransactionOptionsRequest {
StoreInVault = saveCard,
SubmitForSettlement = false
}
};
Including the payment token in the form could be insecure if you submit it to Braintree without validating it against a customer id. That is, if an attacker manipulates the token to one that corresponds to another of your customer's payment method token, the other customer will be charged. If you include the customer id in the transaction request (as you have done), then we will validate that the token matches the customer, so as long as the user can’t manipulate both the customer id and the token, this method is secure.

Shopify API: Get Orders limit

i am receive only 18 orders and also if i set the limit property I get only 18 orders back.
admin/orders.json?limit=50
And if i use the page property
admin/orders.json?limit=50&page=2
it returns empty orders.
{"orders":[]}
After some more searching i found out that this works
admin/orders/search.json?query=&limit=122
but is not mentioned in the API, and is not implemented in the Python SDK
In case anyone cares, you can find this API reference here : http://docs.shopify.com/api/order

Box API: Get_managed_users returning all users

Using the Box 1.0 REST API, I am trying to work with the functions in SOAP UI.
The API doc for get_managed_users with user_id=12345 (internal id retrieved with get_user_id call correctly) is returning all the users. The docs say that would be the case if you do not specify a user_id value. But my full command is: (Token and API key changed to protect the clueless)
https://www.box.com/api/1.0/rest?user_id=27360&auth_token=blahbalhblah1234&action=get_managed_users&api_key=someKeyYouShouldNotSee
Now I could work with the complete result list, but that won't scale as we get thousands of users into the system.
I can make a call with edit_managed_user, using the same user_id value and the change is reflected in the UI, and in the next get_managed_users call. Thus I do have the correct user_id value, I would so assume.
I tried testuser#gmail.com as the user_id value as well, and get the entire list back. This leads me to believe that somehow I am sending user_id wrong, but I just do not see it.
Any hints? Why, with what seems like a valid user_id value is it acting like it is absent or incorrect?
Most likely you have either called this method with an invalid user_id, or one that is not in your set of managed users. Can you double check that the user comes back in your list of already managed users?