Why are billing and delivery address fields required to setup SagePay transactions? - opayo

As the title says, i have some questions about the mandatory valies required to register a server integration transaction.
Questions
Why are Billing Address fields and Delivery address fields required since protocol version 2.23? (seems odd as the transaction is for payment of a service already provided/delivered)
Is there an alternative SagePay integration method that could be used to avoid having to provide these fields?
Quick background about integration requirement
I'm developing a Website bill payment Gateway for 'Client A'. Their customers is sent paper invoices and will have the option to pay their bill online. The customer will enter their bill details and a lookup to a web service provided by 'Client A' will return a bill and bill total.
I will then allow the customer to review their bill and choose to pay their bill via SagePay. When the customer chooses to pay their bill, i was intending to register the transaction with SagePay by sending the fields (VendorTxCode as the bill ID) and the Total of the bill.
'Client A' would then produce a report of successful SagePay transactions and match the (VendorTxCode as the bill ID) to their system to mark the payment as complete.
Thanks
Adam

I believe you can use a SagePay token but you must send this information over the wire on the first hit and subsequently you can use the token it provides you back.

Related

Spring: Paypal Payment on new currencies results to PENDING capture status

I think this is not a code problem since my application can successfully pay and process payments using my account currencies (usd/php/hkd).
Since there was a new requirement to support some currencies (sgd, eur, jpy, etc), I added these currencies Account Settings > Money, banks, and cards.
Btw, I am using paypal order and payment version 2 on spring.
The application was able to pass the currency and value of the transaction (like what I do normally with USD/EUR/PHP).. It was able to create order object, authorized approved payment... but it the capture authorized payment is always stucked at PENDING.
I still need to check on my test paypal account and either Accept/Reject received payment.
However, my application is only checking for COMPLETED capture status for it to considered or mark it as successful payment.
I also tried the configuration on my test paypal account (Account Settings > Payment Preferences > Block Payments).
Tried selecting Yes, accept and convert them to... and Ask me whether to accept or deny each individual payment but the capture status is still PENDING.
Is there a way to proceed with the capture payment and have the status to COMPLETED? Even with payments of different currencies? It would be OK if the payment received will be stored on that currency or have it converted to my default currency (like USD, etc).
What I want is the capture status to proceed to COMPLETED without manually accepting/rejecting payments with other currency (newly added currencies).
Again, I think this is not a coding issue... more of a configuration issue.. but I am not sure which configuration and where to set. I am pretty new with paypal development.
By the way, I based my changes on my paypal account with this link:
Payment Receiving Preferences
TIA
This is standard PayPal behavior. If you accept the first payment in a new currency in a way that opens a balance in such a currency, future payments won't need to be manually accepted. You can also manually open $0 balances in the Money management section, https://www.paypal.com/businessmanage/account/money
The setting in Account Settings > Payment Preferences > Block Payments that you mention to convert non-balance currency transactions to your primary balance will only apply automatically to future payments. Their status should then not be 'PENDING' due to any currency issue.
(If you find that all payments are PENDING, even your primary balance ones, then the pending reason (as stated in the API response) is likely "authorization" -- meaning you created an authorization with intent:AUTHORIZE but haven't captured it yet. Change to intent:CAPTURE to capture immediately.)

How do I trigger a webhook for transaction settlement in sandbox?

I am trying to create a new webhook endpoint for my braintree integration. I added an endpoint to the Control Panel. I am using the Python library and created a a bunch of transactions. Also, I manually settled the transaction using the testing gateway. But I do not get a webhook notification. When is the webhook triggered and I=is there a way to trigger it manually?
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
The Transaction -> Disbursed webhook fires when the transaction has settled, and braintree has begun to move funds from their account to yours. While settling the transaction manually in the control panel would start the process, it does not fire the webhook right away.
There isn't any way to trigger this manually, instead braintree has sample payloads and a way to trigger a "Check" webhook in the control panel.
To answer the question in your comment, this type of webhook does not cover voided transactions.
I also asked a similar question to Braintree support, and the answer may be useful for others, even if I decided to go with Stripe (I found stripe much better after all my tests ;).
Question
Hi,
Just integrating Braintree, but can’t find how I’m supposed to get a transaction confirmation (meaning it has correctly been ‘charged’). When I create a ‘transaction.sale’ (including submitForSettlement) I always get (sandbox) a response indicating the status ‘Submitted for settlement’, and the transaction doesn't go to settled until Braintree globally process it (at night, etc.). I also can’t find a related webhook to get payment confirmation (as I currently get using PayPal - IPN).
When/how can I get a payment confirmation so I can then ‘deliver’ the purchased item? By checking your docs, it’s like you can’t get a confirmation until the next day… how does it work exactly?
Thank you!
Answer
Hi Nacho,
Thanks for reaching out!
A Braintree transaction goes through several steps, the second of which is submitted for settlement. This means that the money has begun to move from the customers account, and is the immediate state of a transaction after being submitted; it's not possible to get an immediate 'settled' or 'complete' status on submission. Transactions in this state will generally move to settling, then settled, within 24 hours, although it can depend on your processing bank.
It is very unusual for a transaction to fail when moving from submitted for settlement to settled, as the amount will have been authorised prior to submission for settlement. Authorising a transaction means the funds are put on hold within the customers account, for a certain timeframe depending on payment method, until they are settled. We get an immediate response from the processing bank as to whether an authorisation is successful, which you'll see in the Braintree_Transaction response object.
As such, you can generally rely on the status of submitted for settlement to reflect a valid, successful transaction.
We don't offer webhooks for transactions - instead, our API is designed to give instant feedback via the response object. Because of this, we only provide webhooks for asynchronous events that aren't triggered by an API call (such as billing a subscription or disbursing funds). We encourage our customers to avail of our API responses, in addition to our reporting system and comprehensive search call options, for any extra functionality they require.
If you wanted to pull updated statuses for transactions, such as to confirm a payment has settled, you could use the Transaction.find() API request, pass in the transaction ID and read in the status from the response object. This could easily be run as a script that iterates through the previous days transaction IDs and updates the status of each on a daily basis.
I hope this explains the transaction process with more clarity and offers you some options!
Kind regards,
Braintree
Just in case it helps!
I also asked kind of the same question to Braintree I got the same answer to check the transaction with Transaction::find() and then asked about the possibility of having a transaction not settled after having a SUBMITTED_FOR_SETTLEMENT status, here is the response, very clear and complete:
Hi Alban,
Thanks for reaching out with this question! Happy to help.
Settlement Declined:
In rare cases, a transaction that has been submitted for settlement will reach a status of settlement declined. For sales, this will only occur with a PayPal transaction. For refunds, this can occur with both PayPal and credit card transactions.
This occurs if the processor declined to settle the sale or refund request, and the result is unsuccessful. This can happen for a number of reasons, but the processor settlement response code may have more information about why the transaction was declined. Again, this status is rare, and only certain types of transactions can be affected.
PayPal sale: We recommend checking the settlement status of all PayPal sale transactions before shipping goods or providing services to customers. To reduce these types of declines, submit your PayPal transactions for settlement either upon creation or within 3 days of creation.
PayPal refund: We recommend contacting PayPal for details on refunds that are Settlement Declined.
Credit card refund: Settlement declines can be hard or soft, just as with authorizations. In regions that support an immediate decline response for refunds, we will return Settlement Declined if the processor responds with a hard decline.
Settlement Pending:
This status indicates that the transaction has not yet fully settled. This status is rare, and it does not always indicate a problem with settlement. Only certain types of transactions can be affected.
--> PayPal sale:
If using multiple partial settlements: Settlement Pending is a normal part of the transaction flow. The parent authorization will remain in this status until all child transactions are settled or the authorization expires. See the multiple partial settlement reference for more details.
If not using multiple partial settlements: Almost all Settlement Pending PayPal transactions will settle without intervention, so we always return a successful result. In general, you can expect these to be updated to Settled within a few days as we confirm their status with PayPal. In the rare case we can't settle a Settlement Pendingtransaction, we'll contact you to resolve the issue.
--> Credit card, Android Pay, and Apple Pay sales: You will only see Settlement Pendingauthorizations if you have contacted us to enable a specific API feature that uses this status.
I hope that provides insight, Alban! Let us know if further questions arise.
Best,
xxxxx.
Braintree

paypal configuration in magento

no purchase order or invoice is sent to the client when paying by credit card. when the payment is made through paypal transaction, it displays an error message "The transaction was declined by paypal gateway"
Why PayPal Declines transaction?
A processor decline indicates that the customer’s bank has refused the transaction request. Sometimes you can tell why it was declined by reading the response code, but only the customer's bank can confirm the specific reason. Here are a few of the most common ones:
Incorrect credit card number or expiration date
Insufficient funds
Some banks will reject charges based on location
Some banks will reject charges based on their own fraud rules
You may also see the PayPal decline article.
Also you can follow PayPal advanced error message "Payment has been declined. Please try again"

Using Multiple PayPal Email Addresses

I have two email addresses set up on PayPal. Both are confirmed, one is set to primary.
And these two email address are used for two different website for accepting money. My websites are based on Magento. Both websites use Standard PayPal and Express Checkout.
But the problems is that transactions from both websites state that payment is sent to primary email.
Where can I set up to sort payments received by which email address was paid, track transactions based on source (different websites).
The Instant Payment Notification (IPN) for the transactions would allow you to distinguish between the two using the receiver_id parameter, which is the unique ID of the account as opposed to an email address.

Recurring Payments - Trial without card

We're developing a system whereby the user will be sign-up and have a 3 month trial without entering card details. Once the trial period is up they get sent an e-mail asking them to come back and register card details in order to setup a recurring payment in order to continue accessing the site.
Is it possible to configure recurring payments with Braintree such that we don't provide a card for the trial period and then configure one upon notification that it has expired?
Thanks!
I work at Braintree. If you want more information than you can easily get on Stack Overflow, please reach out to our support team.
Braintree subscriptions require a credit card to be created. That way, the transition from trial period to billing doesn't require any action by the customer or merchant. Since our core service is billing credit cards, that's what subscriptions are designed to do.
In your case, it sounds like you can create a subscription in your application, and only link it to a Braintree subscription if / when credit card details are entered. You'll need to handle tracking the three month time limit yourself.

Resources